Variable name change: azVar to apVar. (CVS 1404)

FossilOrigin-Name: 45169ce015da07da9a874b5b075ea6a05f59f162
This commit is contained in:
drh
2004-05-19 11:24:25 +00:00
parent 54db47e3da
commit 5a12e68986
5 changed files with 25 additions and 25 deletions
+3 -3
View File
@@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.300 2004/05/19 10:35:01 danielk1977 Exp $
** $Id: vdbe.c,v 1.301 2004/05/19 11:24:26 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -856,14 +856,14 @@ case OP_Variable: {
assert( j>=0 && j<p->nVar );
/* If we need to translate between text encodings, do it now. If this is
** required, then put the new string in p->azVar. This way, if the
** required, then put the new string in p->apVar. This way, if the
** variable is used again, even after the virtual machine is reset, the
** conversion won't have to be done again.
**
** TODO: This is where we need to support databases that use other than
** UTF-8 on disk.
*/
pVar = &p->azVar[j];
pVar = &p->apVar[j];
if( pVar->flags&MEM_Str && !(pVar->flags&MEM_Utf8) ){
char *zUtf8;
assert( pVar->flags&(MEM_Utf16le|MEM_Utf16be) );
+2 -2
View File
@@ -271,8 +271,8 @@ struct Vdbe {
FILE *pFile; /* At most one open file handler */
int nField; /* Number of file fields */
char **azField; /* Data for each file field */
int nVar; /* Number of entries in azVariable[] */
Mem *azVar; /* Values for the OP_Variable opcode. */
int nVar; /* Number of entries in apVar[] */
Mem *apVar; /* Values for the OP_Variable opcode. */
char *zLine; /* A single line from the input file */
int nLineAlloc; /* Number of spaces allocated for zLine */
int magic; /* Magic number for sanity checking */
+10 -10
View File
@@ -616,13 +616,13 @@ void sqlite3VdbeMakeReady(
n = isExplain ? 10 : p->nOp;
p->aStack = sqliteMalloc(
n*(sizeof(p->aStack[0]) + 2*sizeof(char*)) /* aStack and zArgv */
+ p->nVar*sizeof(Mem) /* azVar */
+ p->nVar*sizeof(Mem) /* apVar */
);
p->zArgv = (char**)&p->aStack[n];
p->azColName = (char**)&p->zArgv[n];
p->azVar = (Mem *)&p->azColName[n];
p->apVar = (Mem *)&p->azColName[n];
for(n=0; n<p->nVar; n++){
p->azVar[n].flags = MEM_Null;
p->apVar[n].flags = MEM_Null;
}
}
@@ -761,7 +761,7 @@ static void closeAllCursors(Vdbe *p){
**
** This routine will automatically close any cursors, lists, and/or
** sorters that were left open. It also deletes the values of
** variables in the azVariable[] array.
** variables in the aVar[] array.
*/
static void Cleanup(Vdbe *p){
int i;
@@ -955,7 +955,7 @@ static int vdbeUnbind(Vdbe *p, int i){
return SQLITE_RANGE;
}
i--;
pVar = &p->azVar[i];
pVar = &p->apVar[i];
if( pVar->flags&MEM_Dyn ){
sqliteFree(pVar->z);
}
@@ -978,7 +978,7 @@ static int vdbeBindBlob(
Mem *pVar;
vdbeUnbind(p, i);
pVar = &p->azVar[i-1];
pVar = &p->apVar[i-1];
if( zVal ){
pVar->n = bytes;
@@ -1009,7 +1009,7 @@ int sqlite3_bind_int64(sqlite3_stmt *p, int i, long long int iValue){
Vdbe *v = (Vdbe *)p;
rc = vdbeUnbind(v, i);
if( rc==SQLITE_OK ){
Mem *pVar = &v->azVar[i-1];
Mem *pVar = &v->apVar[i-1];
pVar->flags = MEM_Int;
pVar->i = iValue;
}
@@ -1025,7 +1025,7 @@ int sqlite3_bind_double(sqlite3_stmt *p, int i, double iValue){
Vdbe *v = (Vdbe *)p;
rc = vdbeUnbind(v, i);
if( rc==SQLITE_OK ){
Mem *pVar = &v->azVar[i-1];
Mem *pVar = &v->apVar[i-1];
pVar->flags = MEM_Real;
pVar->r = iValue;
}
@@ -1115,8 +1115,8 @@ void sqlite3VdbeDelete(Vdbe *p){
}
}
for(i=0; i<p->nVar; i++){
if( p->azVar[i].flags&MEM_Dyn ){
sqliteFree(p->azVar[i].z);
if( p->apVar[i].flags&MEM_Dyn ){
sqliteFree(p->apVar[i].z);
}
}
sqliteFree(p->aOp);