diff options
author | drh <drh@noemail.net> | 2014-09-18 17:52:15 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-09-18 17:52:15 +0000 |
commit | 74eaba4de25d955314df279e5ca27aa24f2698ea (patch) | |
tree | 9a89e624b64f3f8c48d924e763c0e9224d0a268d /src/vdbeInt.h | |
parent | 24a096297ef66348e059b07328f1beb466b5e7c9 (diff) | |
download | sqlite-74eaba4de25d955314df279e5ca27aa24f2698ea.tar.gz sqlite-74eaba4de25d955314df279e5ca27aa24f2698ea.zip |
Merge the Mem.r value into the MemValue union as Mem.u.r. Hence, a Mem can
now store an integer or a real but not both at the same time. Strings are
still stored in a separate element Mem.z, for now.
FossilOrigin-Name: 4c8c89d7e62aecfe2eb735f7bb114aed6b452847
Diffstat (limited to 'src/vdbeInt.h')
-rw-r--r-- | src/vdbeInt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vdbeInt.h b/src/vdbeInt.h index 9c7378a26..fb05e9aed 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -161,7 +161,8 @@ struct VdbeFrame { ** integer etc.) of the same value. */ struct Mem { - union { + union MemValue { + double r; /* Real value used when MEM_Realis set in flags */ i64 i; /* Integer value used when MEM_Int is set in flags */ int nZero; /* Used when bit MEM_Zero is set in flags */ FuncDef *pDef; /* Used only when flags==MEM_Agg */ @@ -171,10 +172,9 @@ struct Mem { u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */ u8 enc; /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */ int n; /* Number of characters in string value, excluding '\0' */ - double r; /* Real value */ char *z; /* String or BLOB value */ - char *zMalloc; /* Dynamic buffer allocated by sqlite3_malloc() */ /* ShallowCopy only needs to copy the information above */ + char *zMalloc; /* Dynamic buffer allocated by sqlite3_malloc() */ sqlite3 *db; /* The associated database connection */ void (*xDel)(void*);/* Destructor for Mem.z - only valid if MEM_Dyn */ #ifdef SQLITE_DEBUG |