Combine sqlite3DbOfVdbe() and sqlite3VdbeDb() into a single function. (CVS 4236)
FossilOrigin-Name: ba80ee59a72afe36817997de705ef81d876b6f35
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@
|
||||
** This file contains routines used for analyzing expressions and
|
||||
** for generating VDBE code that evaluates expressions in SQLite.
|
||||
**
|
||||
** $Id: expr.c,v 1.306 2007/08/16 11:36:15 danielk1977 Exp $
|
||||
** $Id: expr.c,v 1.307 2007/08/16 12:24:02 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -1691,7 +1691,7 @@ void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
|
||||
** text z[0..n-1] on the stack.
|
||||
*/
|
||||
static void codeInteger(Vdbe *v, const char *z, int n){
|
||||
assert( z || v==0 || sqlite3DbOfVdbe(v)->mallocFailed );
|
||||
assert( z || v==0 || sqlite3VdbeDb(v)->mallocFailed );
|
||||
if( z ){
|
||||
int i;
|
||||
if( sqlite3GetInt32(z, &i) ){
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle INSERT statements in SQLite.
|
||||
**
|
||||
** $Id: insert.c,v 1.189 2007/08/16 04:30:40 drh Exp $
|
||||
** $Id: insert.c,v 1.190 2007/08/16 12:24:02 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -41,7 +41,7 @@ void sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
|
||||
*/
|
||||
int n;
|
||||
Table *pTab = pIdx->pTable;
|
||||
sqlite3 *db = sqlite3DbOfVdbe(v);
|
||||
sqlite3 *db = sqlite3VdbeDb(v);
|
||||
pIdx->zColAff = (char *)sqlite3DbMallocZero(db, pIdx->nColumn+1);
|
||||
if( !pIdx->zColAff ){
|
||||
return;
|
||||
@@ -80,7 +80,7 @@ void sqlite3TableAffinityStr(Vdbe *v, Table *pTab){
|
||||
if( !pTab->zColAff ){
|
||||
char *zColAff;
|
||||
int i;
|
||||
sqlite3 *db = sqlite3DbOfVdbe(v);
|
||||
sqlite3 *db = sqlite3VdbeDb(v);
|
||||
|
||||
zColAff = (char *)sqlite3DbMallocZero(db, pTab->nCol+1);
|
||||
if( !zColAff ){
|
||||
|
||||
@@ -362,7 +362,6 @@ struct Vdbe {
|
||||
/*
|
||||
** Function prototypes
|
||||
*/
|
||||
sqlite3 *sqlite3DbOfVdbe(Vdbe*);
|
||||
void sqlite3VdbeFreeCursor(Vdbe *, Cursor*);
|
||||
void sqliteVdbePopStack(Vdbe*,int);
|
||||
int sqlite3VdbeCursorMoveto(Cursor*);
|
||||
|
||||
@@ -29,13 +29,6 @@
|
||||
int sqlite3_vdbe_addop_trace = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Return the database connection associated with a VDBE
|
||||
*/
|
||||
sqlite3 *sqlite3DbOfVdbe(Vdbe *p){
|
||||
return p->db;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Create a new virtual database engine.
|
||||
|
||||
Reference in New Issue
Block a user