-C Add\sthe\ssqlite3_status64()\sinterface.\s\sMake\sthe\snew\sinterface\sand\sthe\slegacy\nsqlite3_status()\sboth\satomic\sand\sthreadsafe.\s\sCheck\sthreadsafety\susing\nassert()s.
-D 2015-03-23T17:25:18.212
+C Add\sthe\sSQLITE_PTRSIZE\smacro.\s\sUse\sit\sto\shelp\ssqlite3_status()\srun\sfaster\non\s32-bit\ssystems.
+D 2015-03-23T18:52:56.780
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 88a3e6261286db378fdffa1124cad11b3c05f5bb
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e
F src/lempar.c 7274c97d24bb46631e504332ccd3bd1b37841770
F src/loadext.c 86bd4e2fccd520b748cba52492ab60c4a770f660
-F src/main.c fa997fa27d95febc16d57095299384b667a7f762
+F src/main.c 569d45ba9eb4fbdd631d53f440bcdb4a35ab1505
F src/malloc.c e818a0db9ac0898f9dc74002f3a5baca32232d05
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987
F src/sqlite.h.in df180ecc3215e4b87dbd536507869511bec88841
F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad
F src/sqlite3ext.h 17d487c3c91b0b8c584a32fbeb393f6f795eea7d
-F src/sqliteInt.h de9d20aa5757925a3cd26283d9e34a6ef49904fd
+F src/sqliteInt.h e22a2bfbeed55ed3addff5e0ef34366e93ad0874
F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46
-F src/status.c 35d02aaf02600dfeade53d2adf2455186dfd741e
+F src/status.c 8ccd03e35ac98e44b3df51cbc94a81119c6ab0dd
F src/table.c e7a09215315a978057fb42c640f890160dbcc45e
F src/tclsqlite.c fa72a7c5278662357c105ba7925c1d0972506ff9
F src/test1.c 90fbedce75330d48d99eadb7d5f4223e86969585
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 8d27e3e16a9be79fe227e833f4770ebe09a9d90b
-R 2bfdb46ae6ff687a8efb07761e076d30
-T *branch * status64
-T *sym-status64 *
-T -sym-trunk *
+P 1ce8e8fa4b866aafa12b1da0eb4d02321af9293e
+R 0b9a82d5d161d745ba0c858230f2a6bc
U drh
-Z 89310d97b168ea333a94dce0bcc0bc9f
+Z e9a2419ecec514dae3eef3cef6e74ea6
}
#endif
+ /* If the following assert() fails on some obscure processor/compiler
+ ** combination, the work-around is to set the correct pointer
+ ** size at compile-time using -DSQLITE_PTRSIZE=n compile-time option */
+ assert( SQLITE_PTRSIZE==sizeof(char*) );
+
/* If SQLite is already completely initialized, then this call
** to sqlite3_initialize() should be a no-op. But the initialization
** must be complete. So isInit must not be set until the very end
*/
typedef INT16_TYPE LogEst;
+/*
+** Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer
+*/
+#ifndef SQLITE_PTRSIZE
+# if defined(__SIZEOF_POINTER__)
+# define SQLITE_PTRSIZE __SIZEOF_POINTER__
+# elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \
+ defined(_M_ARM) || defined(__arm__) || defined(__x86)
+# define SQLITE_PTRSIZE 4
+# else
+# define SQLITE_PTRSIZE 8
+# endif
+#endif
+
/*
** Macros to determine whether the machine is big or little endian,
** and whether or not that determination is run-time or compile-time.
*/
typedef struct sqlite3StatType sqlite3StatType;
static SQLITE_WSD struct sqlite3StatType {
+#if SQLITE_PTRSIZE>4
sqlite3_int64 nowValue[10]; /* Current value */
sqlite3_int64 mxValue[10]; /* Maximum value */
+#else
+ u32 nowValue[10]; /* Current value */
+ u32 mxValue[10]; /* Maximum value */
+#endif
} sqlite3Stat = { {0,}, {0,} };
/*
if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
#endif
rc = sqlite3_status64(op, &iCur, &iHwtr, resetFlag);
- *pCurrent = (int)iCur;
- *pHighwater = (int)iHwtr;
+ if( rc==0 ){
+ *pCurrent = (int)iCur;
+ *pHighwater = (int)iHwtr;
+ }
return rc;
}