1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

In the Mem object, stop requiring that Mem.xDel be NULL when the MEM_Dyn

bit is clear.  Also reduce the amount of initialization of Mem objects.
All for a small size reduction and performance increase.

FossilOrigin-Name: fdddb477c89dabb9f7bf2d5ccb32534868df3a03
This commit is contained in:
drh
2014-09-17 16:41:15 +00:00
parent 0725cabe3a
commit d3b74200a8
6 changed files with 37 additions and 41 deletions

View File

@@ -176,7 +176,7 @@ struct Mem {
char *zMalloc; /* Dynamic buffer allocated by sqlite3_malloc() */
/* ShallowCopy only needs to copy the information above */
sqlite3 *db; /* The associated database connection */
void (*xDel)(void*);/* If not null, call this function to delete Mem.z */
void (*xDel)(void*);/* Destructor for Mem.z - only valid if MEM_Dyn */
#ifdef SQLITE_DEBUG
Mem *pScopyFrom; /* This Mem is a shallow copy of pScopyFrom */
void *pFiller; /* So that sizeof(Mem) is a multiple of 8 */
@@ -397,8 +397,8 @@ u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
void sqlite3VdbeDeleteAuxData(Vdbe*, int, int);
int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
int sqlite3VdbeIdxKeyCompare(VdbeCursor*,UnpackedRecord*,int*);
int sqlite3VdbeIdxRowid(BtCursor *, i64 *);
int sqlite3VdbeIdxKeyCompare(sqlite3*,VdbeCursor*,UnpackedRecord*,int*);
int sqlite3VdbeIdxRowid(sqlite3*, BtCursor*, i64*);
int sqlite3VdbeExec(Vdbe*);
int sqlite3VdbeList(Vdbe*);
int sqlite3VdbeHalt(Vdbe*);
@@ -415,6 +415,7 @@ void sqlite3VdbeMemSetInt64(Mem*, i64);
#else
void sqlite3VdbeMemSetDouble(Mem*, double);
#endif
void sqlite3VdbeMemInit(Mem*,sqlite3*,u16);
void sqlite3VdbeMemSetNull(Mem*);
void sqlite3VdbeMemSetZeroBlob(Mem*,int);
void sqlite3VdbeMemSetRowSet(Mem*);