From 69def7ff2f872b3c7579d93843ba504e61dc2b2f Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 04:14:37 +0000 Subject: [PATCH 01/24] Work in progress on setting a calling convention for all callback functions. FossilOrigin-Name: 02b8040e1add02734d2dbc6c59737ab74ff8fb18 --- Makefile.msc | 13 +- autoconf/Makefile.msc | 8 +- ext/misc/percentile.c | 2 +- ext/misc/spellfix.c | 2 +- manifest | 36 ++-- manifest.uuid | 2 +- src/sqlite.h.in | 339 +++++++++++++++++++++----------------- src/tclsqlite.c | 2 +- src/test1.c | 2 +- tool/mksqlite3c-noext.tcl | 2 +- tool/mksqlite3c.tcl | 2 +- tool/mksqlite3h.tcl | 2 +- 12 files changed, 230 insertions(+), 182 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index cd866ce4a4..7220f71cd4 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -464,20 +464,24 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS) # !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0 !IF "$(PLATFORM)"=="x86" -CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall -SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall +CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall !ELSE !IFNDEF PLATFORM -CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall -SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall +CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall !ELSE CORE_CCONV_OPTS = SHELL_CCONV_OPTS = +TEST_CCONV_OPTS = !ENDIF !ENDIF !ELSE CORE_CCONV_OPTS = SHELL_CCONV_OPTS = +TEST_CCONV_OPTS = !ENDIF # These are additional compiler options used for the core library. @@ -1960,6 +1964,7 @@ TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN) TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024 +TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS) TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C) diff --git a/autoconf/Makefile.msc b/autoconf/Makefile.msc index 7f62bcb129..2f7447383f 100644 --- a/autoconf/Makefile.msc +++ b/autoconf/Makefile.msc @@ -449,12 +449,12 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS) # !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0 !IF "$(PLATFORM)"=="x86" -CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall -SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall +CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall !ELSE !IFNDEF PLATFORM -CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall -SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall +CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall !ELSE CORE_CCONV_OPTS = SHELL_CCONV_OPTS = diff --git a/ext/misc/percentile.c b/ext/misc/percentile.c index 74a4c9d12b..a5d7e84913 100644 --- a/ext/misc/percentile.c +++ b/ext/misc/percentile.c @@ -167,7 +167,7 @@ static void percentStep(sqlite3_context *pCtx, int argc, sqlite3_value **argv){ /* ** Compare to doubles for sorting using qsort() */ -static int doubleCmp(const void *pA, const void *pB){ +static int SQLITE_CDECL doubleCmp(const void *pA, const void *pB){ double a = *(double*)pA; double b = *(double*)pB; if( a==b ) return 0; diff --git a/ext/misc/spellfix.c b/ext/misc/spellfix.c index cbcf8b7c5d..1ac1712f4e 100644 --- a/ext/misc/spellfix.c +++ b/ext/misc/spellfix.c @@ -2231,7 +2231,7 @@ static int spellfix1Score(int iDistance, int iRank){ ** Compare two spellfix1_row objects for sorting purposes in qsort() such ** that they sort in order of increasing distance. */ -static int spellfix1RowCompare(const void *A, const void *B){ +static int SQLITE_CDECL spellfix1RowCompare(const void *A, const void *B){ const struct spellfix1_row *a = (const struct spellfix1_row*)A; const struct spellfix1_row *b = (const struct spellfix1_row*)B; return a->iScore - b->iScore; diff --git a/manifest b/manifest index d0e7b14e54..a174c165d9 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C Enhance\sthe\squery\splanner\scost\sestimation\sfor\sindex\sscans\sto\stake\sinto\saccount\nWHERE\sclause\sterms\sthat\scan\sbe\scomputed\susing\sonly\sthe\sindex\sand\sthat\sdo\snot\nrequire\slooking\sup\srows\sin\sthe\soriginal\stable.\s\sThis\sfixes\san\sobscure\nperformance\sregression\sthat\sarose\swhen\sthe\sORDER\sBY\sLIMIT\soptimization\swas\nadded\sby\scheck-in\s[bf46179d44843]. -D 2016-07-27T19:30:53.586 +C Work\sin\sprogress\son\ssetting\sa\scalling\sconvention\sfor\sall\scallback\sfunctions. +D 2016-07-28T04:14:37.455 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a +F Makefile.msc 843c563182b26a358674c520d7b8d40b832e9436 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -11,7 +11,7 @@ F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am 1a47d071e3d5435f8f7ebff7eb6703848bbd65d4 -F autoconf/Makefile.msc 0eca137c12542bd76c253a2d24380f29ade59b95 +F autoconf/Makefile.msc 05a99e98a8895461574ccb9604444d9e97c1f0b6 F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7 F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1 F autoconf/configure.ac cacf2616abf6e4a569bde2ef365c143caeec40bc @@ -214,13 +214,13 @@ F ext/misc/fuzzer.c 7c64b8197bb77b7d64eff7cac7848870235d4c25 F ext/misc/ieee754.c f190d0cc5182529acb15babd177781be1ac1718c F ext/misc/json1.c d51a764ba43a49e191bc3536238bfab3def258ca F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342 -F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63 +F ext/misc/percentile.c 92699c8cd7d517ff610e6037e56506f8904dae2e F ext/misc/regexp.c a68d25c659bd2d893cd1215667bbf75ecb9dc7d4 F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a F ext/misc/scrub.c 1c5bfb8b0cd18b602fcb55755e84abf0023ac2fb F ext/misc/series.c e11e534ada797d5b816d7e7a93c022306563ca35 F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52 -F ext/misc/spellfix.c bf1b922c2750698e9a3d4c50cce6974adb7e93be +F ext/misc/spellfix.c a4723b6aff748a417b5091b68a46443265c40f0d F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95 F ext/misc/vfsstat.c 6110aeeaab2f1df17a923c8a8acef3c74f6dc515 @@ -385,15 +385,15 @@ F src/resolve.c cca3aa77b95706df5d635a2141a4d1de60ae6598 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c f3c6e9065fb34f6a23af27ec7f1f717ffbfc2ee4 F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5 -F src/sqlite.h.in c6e68a4a47610631822a4f8f83a44c9f75339331 +F src/sqlite.h.in a0760a3f7b1939e395a3e74d245e5bb03cd54fb1 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9 F src/sqliteInt.h d25c18c1272a7811e2569c39bfc2fca96156eead F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9 -F src/tclsqlite.c 5c213bf5fee084390f632df2328cf0821d483799 -F src/test1.c 186e3b53c402b7a73bcb4ade2b77709675c39fe3 +F src/tclsqlite.c 53274d5bbd66e7246c573a6b48026781d42c7efe +F src/test1.c 5ec959d088af063cac44cf1685455f3fcddecc8c F src/test2.c 5586f43fcd9a1be0830793cf9d354082c261b25b F src/test3.c c75c8af0eadb335236c9e61b51044c58a8f7dd59 F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e @@ -1448,9 +1448,9 @@ F tool/mkopcodeh.tcl a01d2c1d8a6205b03fc635adf3735b4c523befd3 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl f0d5bb266d1d388cf86fce5ba01a891e95d72d41 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 -F tool/mksqlite3c-noext.tcl 87240b09c20042999b41d5fabe091b7111287835 -F tool/mksqlite3c.tcl 63af8429841f08552e6da1d93b3dee4a93ff8071 -F tool/mksqlite3h.tcl e7b106fc4f29fbc258e8ba9b88d9108332ea2ade +F tool/mksqlite3c-noext.tcl aa58ea3be311c81821c2cd3209f55e46b07ab656 +F tool/mksqlite3c.tcl a52ead27e2ac5d4b616e945a0601f628f4328329 +F tool/mksqlite3h.tcl fab97967314e63384a3ed23fd35f0d8188352400 F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl 4abcaf3267171b2faadaf9b82a0dfbaa6e98f8b7 F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 @@ -1508,8 +1508,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 4d59df02d3713b3e3804e1a88e676749b2794286 50f8ea37fb9647c4a9da2c269a4d6f54b10ce96b -R a589b595bdfe9868de18def836f199ce -T +closed 50f8ea37fb9647c4a9da2c269a4d6f54b10ce96b -U drh -Z 994e8dc5cbb7e25d0e8cc4a952504fbd +P 9e2b26811452a5011d0a97a689636fa4409da856 +R 6c56defa4f9211ce028bec2ac1e13231 +T *branch * callbackConv +T *sym-callbackConv * +T -sym-trunk * +U mistachkin +Z d50c4a0ba4b8e38dec3c91619f068656 diff --git a/manifest.uuid b/manifest.uuid index 9b63447ecc..57781e18c1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9e2b26811452a5011d0a97a689636fa4409da856 \ No newline at end of file +02b8040e1add02734d2dbc6c59737ab74ff8fb18 \ No newline at end of file diff --git a/src/sqlite.h.in b/src/sqlite.h.in index e8f5d24845..009f080a86 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -54,9 +54,19 @@ extern "C" { #ifndef SQLITE_CDECL # define SQLITE_CDECL #endif -#ifndef SQLITE_STDCALL -# define SQLITE_STDCALL +#ifndef SQLITE_APICALL +# define SQLITE_APICALL #endif +#ifndef SQLITE_STDCALL +# define SQLITE_STDCALL SQLITE_APICALL +#endif +#ifndef SQLITE_CALLBACK +# define SQLITE_CALLBACK +#endif +#ifndef SQLITE_SYSAPI +# define SQLITE_SYSAPI +#endif + /* ** These no-op macros are used in front of interfaces to mark those @@ -318,7 +328,7 @@ int sqlite3_close_v2(sqlite3*); ** This is legacy and deprecated. It is included for historical ** compatibility and is not documented. */ -typedef int (*sqlite3_callback)(void*,int,char**, char**); +typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); /* ** CAPI3REF: One-Step Query Execution Interface @@ -385,7 +395,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**); int sqlite3_exec( sqlite3*, /* An open database */ const char *sql, /* SQL to be evaluated */ - int (*callback)(void*,int,char**,char**), /* Callback function */ + int (SQLITE_CALLBACK *callback)(void*,int,char**,char**), /* Callback func */ void *, /* 1st argument to callback */ char **errmsg /* Error msg written here */ ); @@ -733,26 +743,30 @@ struct sqlite3_file { typedef struct sqlite3_io_methods sqlite3_io_methods; struct sqlite3_io_methods { int iVersion; - int (*xClose)(sqlite3_file*); - int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); - int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); - int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); - int (*xSync)(sqlite3_file*, int flags); - int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); - int (*xLock)(sqlite3_file*, int); - int (*xUnlock)(sqlite3_file*, int); - int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); - int (*xFileControl)(sqlite3_file*, int op, void *pArg); - int (*xSectorSize)(sqlite3_file*); - int (*xDeviceCharacteristics)(sqlite3_file*); + int (SQLITE_CALLBACK *xClose)(sqlite3_file*); + int (SQLITE_CALLBACK *xRead)(sqlite3_file*, void*, int iAmt, + sqlite3_int64 iOfst); + int (SQLITE_CALLBACK *xWrite)(sqlite3_file*, const void*, int iAmt, + sqlite3_int64 iOfst); + int (SQLITE_CALLBACK *xTruncate)(sqlite3_file*, sqlite3_int64 size); + int (SQLITE_CALLBACK *xSync)(sqlite3_file*, int flags); + int (SQLITE_CALLBACK *xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); + int (SQLITE_CALLBACK *xLock)(sqlite3_file*, int); + int (SQLITE_CALLBACK *xUnlock)(sqlite3_file*, int); + int (SQLITE_CALLBACK *xCheckReservedLock)(sqlite3_file*, int *pResOut); + int (SQLITE_CALLBACK *xFileControl)(sqlite3_file*, int op, void *pArg); + int (SQLITE_CALLBACK *xSectorSize)(sqlite3_file*); + int (SQLITE_CALLBACK *xDeviceCharacteristics)(sqlite3_file*); /* Methods above are valid for version 1 */ - int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); - int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); - void (*xShmBarrier)(sqlite3_file*); - int (*xShmUnmap)(sqlite3_file*, int deleteFlag); + int (SQLITE_CALLBACK *xShmMap)(sqlite3_file*, int iPg, int pgsz, int, + void volatile**); + int (SQLITE_CALLBACK *xShmLock)(sqlite3_file*, int offset, int n, int flags); + void (SQLITE_CALLBACK *xShmBarrier)(sqlite3_file*); + int (SQLITE_CALLBACK *xShmUnmap)(sqlite3_file*, int deleteFlag); /* Methods above are valid for version 2 */ - int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); - int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); + int (SQLITE_CALLBACK *xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, + void **pp); + int (SQLITE_CALLBACK *xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); /* Methods above are valid for version 3 */ /* Additional methods may be added in future releases */ }; @@ -1194,7 +1208,7 @@ typedef struct sqlite3_mutex sqlite3_mutex; ** any of these methods if the iVersion of the VFS is less than 3. */ typedef struct sqlite3_vfs sqlite3_vfs; -typedef void (*sqlite3_syscall_ptr)(void); +typedef void (SQLITE_SYSAPI *sqlite3_syscall_ptr)(void); struct sqlite3_vfs { int iVersion; /* Structure version number (currently 3) */ int szOsFile; /* Size of subclassed sqlite3_file */ @@ -1202,31 +1216,37 @@ struct sqlite3_vfs { sqlite3_vfs *pNext; /* Next registered VFS */ const char *zName; /* Name of this virtual file system */ void *pAppData; /* Pointer to application-specific data */ - int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, + int (SQLITE_CALLBACK *xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, int flags, int *pOutFlags); - int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); - int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); - int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); - void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); - void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); - void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); - void (*xDlClose)(sqlite3_vfs*, void*); - int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); - int (*xSleep)(sqlite3_vfs*, int microseconds); - int (*xCurrentTime)(sqlite3_vfs*, double*); - int (*xGetLastError)(sqlite3_vfs*, int, char *); + int (SQLITE_CALLBACK *xDelete)(sqlite3_vfs*, const char *zName, int syncDir); + int (SQLITE_CALLBACK *xAccess)(sqlite3_vfs*, const char *zName, int flags, + int *pResOut); + int (SQLITE_CALLBACK *xFullPathname)(sqlite3_vfs*, const char *zName, + int nOut, char *zOut); + void *(SQLITE_CALLBACK *xDlOpen)(sqlite3_vfs*, const char *zFilename); + void (SQLITE_CALLBACK *xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); + void (*(SQLITE_CALLBACK *xDlSym)(sqlite3_vfs*,void*, + const char *zSymbol))(void); + void (SQLITE_CALLBACK *xDlClose)(sqlite3_vfs*, void*); + int (SQLITE_CALLBACK *xRandomness)(sqlite3_vfs*, int nByte, char *zOut); + int (SQLITE_CALLBACK *xSleep)(sqlite3_vfs*, int microseconds); + int (SQLITE_CALLBACK *xCurrentTime)(sqlite3_vfs*, double*); + int (SQLITE_CALLBACK *xGetLastError)(sqlite3_vfs*, int, char *); /* ** The methods above are in version 1 of the sqlite_vfs object ** definition. Those that follow are added in version 2 or later */ - int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); + int (SQLITE_CALLBACK *xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); /* ** The methods above are in versions 1 and 2 of the sqlite_vfs object. ** Those below are for version 3 and greater. */ - int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); - sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); - const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); + int (SQLITE_CALLBACK *xSetSystemCall)(sqlite3_vfs*, const char *zName, + sqlite3_syscall_ptr); + sqlite3_syscall_ptr (SQLITE_CALLBACK *xGetSystemCall)(sqlite3_vfs*, + const char *zName); + const char *(SQLITE_CALLBACK *xNextSystemCall)(sqlite3_vfs*, + const char *zName); /* ** The methods above are in versions 1 through 3 of the sqlite_vfs object. ** New fields may be appended in future versions. The iVersion @@ -1493,13 +1513,13 @@ int sqlite3_db_config(sqlite3*, int op, ...); */ typedef struct sqlite3_mem_methods sqlite3_mem_methods; struct sqlite3_mem_methods { - void *(*xMalloc)(int); /* Memory allocation function */ - void (*xFree)(void*); /* Free a prior allocation */ - void *(*xRealloc)(void*,int); /* Resize an allocation */ - int (*xSize)(void*); /* Return the size of an allocation */ - int (*xRoundup)(int); /* Round up request size to allocation size */ - int (*xInit)(void*); /* Initialize the memory allocator */ - void (*xShutdown)(void*); /* Deinitialize the memory allocator */ + void *(SQLITE_CALLBACK *xMalloc)(int); /* Memory allocation function */ + void (SQLITE_CALLBACK *xFree)(void*); /* Free a prior allocation */ + void *(SQLITE_CALLBACK *xRealloc)(void*,int); /* Resize an allocation */ + int (SQLITE_CALLBACK *xSize)(void*); /* Return the size of an allocation */ + int (SQLITE_CALLBACK *xRoundup)(int); /* Round up size to allocation size */ + int (SQLITE_CALLBACK *xInit)(void*); /* Initialize the memory allocator */ + void (SQLITE_CALLBACK *xShutdown)(void*); /* Deinitialize memory allocator */ void *pAppData; /* Argument to xInit() and xShutdown() */ }; @@ -2233,7 +2253,7 @@ int sqlite3_complete16(const void *sql); ** A busy handler must not close the database connection ** or [prepared statement] that invoked the busy handler. */ -int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); +int sqlite3_busy_handler(sqlite3*, int(SQLITE_CALLBACK *)(void*,int), void*); /* ** CAPI3REF: Set A Busy Timeout @@ -2677,7 +2697,8 @@ void sqlite3_randomness(int N, void *P); */ int sqlite3_set_authorizer( sqlite3*, - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), + int (SQLITE_CALLBACK *xAuth)(void*,int,const char*,const char*,const char*, + const char*), void *pUserData ); @@ -2784,9 +2805,9 @@ int sqlite3_set_authorizer( ** subject to change in future versions of SQLite. */ SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, - void(*xTrace)(void*,const char*), void*); + void(SQLITE_CALLBACK *xTrace)(void*,const char*), void*); SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, - void(*xProfile)(void*,const char*,sqlite3_uint64), void*); + void(SQLITE_CALLBACK *xProfile)(void*,const char*,sqlite3_uint64), void*); /* ** CAPI3REF: SQL Trace Event Codes @@ -2877,7 +2898,7 @@ SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, int sqlite3_trace_v2( sqlite3*, unsigned uMask, - int(*xCallback)(unsigned,void*,void*,void*), + int(SQLITE_CALLBACK *xCallback)(unsigned,void*,void*,void*), void *pCtx ); @@ -2913,7 +2934,7 @@ int sqlite3_trace_v2( ** database connections for the meaning of "modify" in this paragraph. ** */ -void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); +void sqlite3_progress_handler(sqlite3*,int,int(SQLITE_CALLBACK *)(void*),void*); /* ** CAPI3REF: Opening A New Database Connection @@ -3744,17 +3765,20 @@ typedef struct sqlite3_context sqlite3_context; ** See also: [sqlite3_bind_parameter_count()], ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. */ -int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); +int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, + void(SQLITE_CALLBACK *)(void*)); int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, - void(*)(void*)); + void(SQLITE_CALLBACK *)(void*)); int sqlite3_bind_double(sqlite3_stmt*, int, double); int sqlite3_bind_int(sqlite3_stmt*, int, int); int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); int sqlite3_bind_null(sqlite3_stmt*, int); -int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); -int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); +int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int, + void(SQLITE_CALLBACK *)(void*)); +int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, + void(SQLITE_CALLBACK *)(void*)); int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, - void(*)(void*), unsigned char encoding); + void(SQLITE_CALLBACK *)(void*), unsigned char encoding); int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); @@ -4422,9 +4446,9 @@ int sqlite3_create_function( int nArg, int eTextRep, void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) + void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), + void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), + void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) ); int sqlite3_create_function16( sqlite3 *db, @@ -4432,9 +4456,9 @@ int sqlite3_create_function16( int nArg, int eTextRep, void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) + void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), + void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), + void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) ); int sqlite3_create_function_v2( sqlite3 *db, @@ -4442,10 +4466,10 @@ int sqlite3_create_function_v2( int nArg, int eTextRep, void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*), - void(*xDestroy)(void*) + void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), + void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), + void (SQLITE_CALLBACK *xFinal)(sqlite3_context*), + void (SQLITE_CALLBACK *xDestroy)(void*) ); /* @@ -4487,8 +4511,9 @@ SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); SQLITE_DEPRECATED int sqlite3_global_recover(void); SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); -SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), - void*,sqlite3_int64); +SQLITE_DEPRECATED int sqlite3_memory_alarm( + void(SQLITE_CALLBACK *)(void*,sqlite3_int64,int), + void*,sqlite3_int64); #endif /* @@ -4707,7 +4732,8 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context*); ** the SQL function is running. */ void *sqlite3_get_auxdata(sqlite3_context*, int N); -void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); +void sqlite3_set_auxdata(sqlite3_context*, int N, void*, + void (SQLITE_CALLBACK *)(void*)); /* @@ -4724,7 +4750,7 @@ void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); ** The typedef is necessary to work around problems in certain ** C++ compilers. */ -typedef void (*sqlite3_destructor_type)(void*); +typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); #define SQLITE_STATIC ((sqlite3_destructor_type)0) #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) @@ -4843,9 +4869,10 @@ typedef void (*sqlite3_destructor_type)(void*); ** than the one containing the application-defined function that received ** the [sqlite3_context] pointer, the results are undefined. */ -void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); +void sqlite3_result_blob(sqlite3_context*, const void*, int, + void(SQLITE_CALLBACK *)(void*)); void sqlite3_result_blob64(sqlite3_context*,const void*, - sqlite3_uint64,void(*)(void*)); + sqlite3_uint64,void(SQLITE_CALLBACK *)(void*)); void sqlite3_result_double(sqlite3_context*, double); void sqlite3_result_error(sqlite3_context*, const char*, int); void sqlite3_result_error16(sqlite3_context*, const void*, int); @@ -4855,12 +4882,17 @@ void sqlite3_result_error_code(sqlite3_context*, int); void sqlite3_result_int(sqlite3_context*, int); void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); void sqlite3_result_null(sqlite3_context*); -void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); +void sqlite3_result_text(sqlite3_context*, const char*, int, + void(SQLITE_CALLBACK *)(void*)); void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, - void(*)(void*), unsigned char encoding); -void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); + void(SQLITE_CALLBACK *)(void*), + unsigned char encoding); +void sqlite3_result_text16(sqlite3_context*, const void*, int, + void(SQLITE_CALLBACK *)(void*)); +void sqlite3_result_text16le(sqlite3_context*, const void*, int, + void(SQLITE_CALLBACK *)(void*)); +void sqlite3_result_text16be(sqlite3_context*, const void*, int, + void(SQLITE_CALLBACK *)(void*)); void sqlite3_result_value(sqlite3_context*, sqlite3_value*); void sqlite3_result_zeroblob(sqlite3_context*, int n); int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); @@ -4965,22 +4997,22 @@ int sqlite3_create_collation( const char *zName, int eTextRep, void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) + int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) ); int sqlite3_create_collation_v2( sqlite3*, const char *zName, int eTextRep, void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*), - void(*xDestroy)(void*) + int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*), + void(SQLITE_CALLBACK *xDestroy)(void*) ); int sqlite3_create_collation16( sqlite3*, const void *zName, int eTextRep, void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) + int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) ); /* @@ -5013,12 +5045,12 @@ int sqlite3_create_collation16( int sqlite3_collation_needed( sqlite3*, void*, - void(*)(void*,sqlite3*,int eTextRep,const char*) + void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const char*) ); int sqlite3_collation_needed16( sqlite3*, void*, - void(*)(void*,sqlite3*,int eTextRep,const void*) + void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const void*) ); #ifdef SQLITE_HAS_CODEC @@ -5317,8 +5349,8 @@ sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); ** ** See also the [sqlite3_update_hook()] interface. */ -void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); +void *sqlite3_commit_hook(sqlite3*, int(SQLITE_CALLBACK *)(void*), void*); +void *sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); /* ** CAPI3REF: Data Change Notification Callbacks @@ -5371,7 +5403,7 @@ void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); */ void *sqlite3_update_hook( sqlite3*, - void(*)(void *,int ,char const *,char const *,sqlite3_int64), + void(SQLITE_CALLBACK *)(void *,int ,char const *,char const *,sqlite3_int64), void* ); @@ -5698,7 +5730,7 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** See also: [sqlite3_reset_auto_extension()] ** and [sqlite3_cancel_auto_extension()] */ -int sqlite3_auto_extension(void (*xEntryPoint)(void)); +int sqlite3_auto_extension(void (SQLITE_CALLBACK *xEntryPoint)(void)); /* ** CAPI3REF: Cancel Automatic Extension Loading @@ -5710,7 +5742,7 @@ int sqlite3_auto_extension(void (*xEntryPoint)(void)); ** unregistered and it returns 0 if X was not on the list of initialization ** routines. */ -int sqlite3_cancel_auto_extension(void (*xEntryPoint)(void)); +int sqlite3_cancel_auto_extension(void (SQLITE_CALLBACK *xEntryPoint)(void)); /* ** CAPI3REF: Reset Automatic Extension Loading @@ -5755,37 +5787,41 @@ typedef struct sqlite3_module sqlite3_module; */ struct sqlite3_module { int iVersion; - int (*xCreate)(sqlite3*, void *pAux, + int (SQLITE_CALLBACK *xCreate)(sqlite3*, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVTab, char**); - int (*xConnect)(sqlite3*, void *pAux, + int (SQLITE_CALLBACK *xConnect)(sqlite3*, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVTab, char**); - int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); - int (*xDisconnect)(sqlite3_vtab *pVTab); - int (*xDestroy)(sqlite3_vtab *pVTab); - int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); - int (*xClose)(sqlite3_vtab_cursor*); - int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, - int argc, sqlite3_value **argv); - int (*xNext)(sqlite3_vtab_cursor*); - int (*xEof)(sqlite3_vtab_cursor*); - int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); - int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); - int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); - int (*xBegin)(sqlite3_vtab *pVTab); - int (*xSync)(sqlite3_vtab *pVTab); - int (*xCommit)(sqlite3_vtab *pVTab); - int (*xRollback)(sqlite3_vtab *pVTab); - int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, - void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), - void **ppArg); - int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); + int (SQLITE_CALLBACK *xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); + int (SQLITE_CALLBACK *xDisconnect)(sqlite3_vtab *pVTab); + int (SQLITE_CALLBACK *xDestroy)(sqlite3_vtab *pVTab); + int (SQLITE_CALLBACK *xOpen)(sqlite3_vtab *pVTab, + sqlite3_vtab_cursor **ppCursor); + int (SQLITE_CALLBACK *xClose)(sqlite3_vtab_cursor*); + int (SQLITE_CALLBACK *xFilter)(sqlite3_vtab_cursor*, + int idxNum, const char *idxStr, + int argc, sqlite3_value **argv); + int (SQLITE_CALLBACK *xNext)(sqlite3_vtab_cursor*); + int (SQLITE_CALLBACK *xEof)(sqlite3_vtab_cursor*); + int (SQLITE_CALLBACK *xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); + int (SQLITE_CALLBACK *xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); + int (SQLITE_CALLBACK *xUpdate)(sqlite3_vtab *, int, sqlite3_value **, + sqlite3_int64 *); + int (SQLITE_CALLBACK *xBegin)(sqlite3_vtab *pVTab); + int (SQLITE_CALLBACK *xSync)(sqlite3_vtab *pVTab); + int (SQLITE_CALLBACK *xCommit)(sqlite3_vtab *pVTab); + int (SQLITE_CALLBACK *xRollback)(sqlite3_vtab *pVTab); + int (SQLITE_CALLBACK *xFindFunction)(sqlite3_vtab *pVtab, + int nArg, const char *zName, + void (SQLITE_CALLBACK **pxFunc)(sqlite3_context*,int,sqlite3_value**), + void **ppArg); + int (SQLITE_CALLBACK *xRename)(sqlite3_vtab *pVtab, const char *zNew); /* The methods above are in version 1 of the sqlite_module object. Those ** below are for version 2 and greater. */ - int (*xSavepoint)(sqlite3_vtab *pVTab, int); - int (*xRelease)(sqlite3_vtab *pVTab, int); - int (*xRollbackTo)(sqlite3_vtab *pVTab, int); + int (SQLITE_CALLBACK *xSavepoint)(sqlite3_vtab *pVTab, int); + int (SQLITE_CALLBACK *xRelease)(sqlite3_vtab *pVTab, int); + int (SQLITE_CALLBACK *xRollbackTo)(sqlite3_vtab *pVTab, int); }; /* @@ -5974,7 +6010,7 @@ int sqlite3_create_module_v2( const char *zName, /* Name of the module */ const sqlite3_module *p, /* Methods for the module */ void *pClientData, /* Client data for xCreate/xConnect */ - void(*xDestroy)(void*) /* Module destructor function */ + void(SQLITE_CALLBACK *xDestroy)(void*) /* Module destructor function */ ); /* @@ -6515,15 +6551,15 @@ void sqlite3_mutex_leave(sqlite3_mutex*); */ typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; struct sqlite3_mutex_methods { - int (*xMutexInit)(void); - int (*xMutexEnd)(void); - sqlite3_mutex *(*xMutexAlloc)(int); - void (*xMutexFree)(sqlite3_mutex *); - void (*xMutexEnter)(sqlite3_mutex *); - int (*xMutexTry)(sqlite3_mutex *); - void (*xMutexLeave)(sqlite3_mutex *); - int (*xMutexHeld)(sqlite3_mutex *); - int (*xMutexNotheld)(sqlite3_mutex *); + int (SQLITE_CALLBACK *xMutexInit)(void); + int (SQLITE_CALLBACK *xMutexEnd)(void); + sqlite3_mutex *(SQLITE_CALLBACK *xMutexAlloc)(int); + void (SQLITE_CALLBACK *xMutexFree)(sqlite3_mutex *); + void (SQLITE_CALLBACK *xMutexEnter)(sqlite3_mutex *); + int (SQLITE_CALLBACK *xMutexTry)(sqlite3_mutex *); + void (SQLITE_CALLBACK *xMutexLeave)(sqlite3_mutex *); + int (SQLITE_CALLBACK *xMutexHeld)(sqlite3_mutex *); + int (SQLITE_CALLBACK *xMutexNotheld)(sqlite3_mutex *); }; /* @@ -7219,18 +7255,21 @@ typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; struct sqlite3_pcache_methods2 { int iVersion; void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); - void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, - unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); - void (*xShrink)(sqlite3_pcache*); + int (SQLITE_CALLBACK *xInit)(void*); + void (SQLITE_CALLBACK *xShutdown)(void*); + sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int szExtra, + int bPurgeable); + void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); + int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); + sqlite3_pcache_page *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, + int createFlag); + void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, + int discard); + void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, + unsigned oldKey, unsigned newKey); + void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); + void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); + void (SQLITE_CALLBACK *xShrink)(sqlite3_pcache*); }; /* @@ -7241,16 +7280,18 @@ struct sqlite3_pcache_methods2 { typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; struct sqlite3_pcache_methods { void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, void*, int discard); - void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); + int (SQLITE_CALLBACK *xInit)(void*); + void (SQLITE_CALLBACK *xShutdown)(void*); + sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int bPurgeable); + void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); + int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); + void *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, + int createFlag); + void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, void*, int discard); + void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, void*, unsigned oldKey, + unsigned newKey); + void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); + void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); }; @@ -7580,7 +7621,7 @@ int sqlite3_backup_pagecount(sqlite3_backup *p); */ int sqlite3_unlock_notify( sqlite3 *pBlocked, /* Waiting connection */ - void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ + void (SQLITE_CALLBACK *xNotify)(void **apArg, int nArg), /* Callback func */ void *pNotifyArg /* Argument to pass to xNotify */ ); @@ -7695,7 +7736,7 @@ void sqlite3_log(int iErrCode, const char *zFormat, ...); */ void *sqlite3_wal_hook( sqlite3*, - int(*)(void *,sqlite3*,const char*,int), + int(SQLITE_CALLBACK *)(void *,sqlite3*,const char*,int), void* ); @@ -8168,7 +8209,7 @@ int sqlite3_db_cacheflush(sqlite3*); */ SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( sqlite3 *db, - void(*xPreUpdate)( + void(SQLITE_CALLBACK *xPreUpdate)( void *pCtx, /* Copy of third arg to preupdate_hook() */ sqlite3 *db, /* Database handle */ int op, /* SQLITE_UPDATE, DELETE or INSERT */ diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 2de88f41f4..e559043c08 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -4167,7 +4167,7 @@ static void init_all(Tcl_Interp *interp){ #endif #define TCLSH_MAIN main /* Needed to fake out mktclapp */ -int TCLSH_MAIN(int argc, char **argv){ +int SQLITE_CDECL TCLSH_MAIN(int argc, char **argv){ Tcl_Interp *interp; #if !defined(_WIN32_WCE) diff --git a/src/test1.c b/src/test1.c index 7d83881139..35c43d0ef9 100644 --- a/src/test1.c +++ b/src/test1.c @@ -6444,7 +6444,7 @@ struct win32FileLocker { /* ** The background thread that does file locking. */ -static void win32_file_locker(void *pAppData){ +static void SQLITE_CDECL win32_file_locker(void *pAppData){ struct win32FileLocker *p = (struct win32FileLocker*)pAppData; if( p->evName ){ HANDLE ev = OpenEvent(EVENT_MODIFY_STATE, FALSE, p->evName); diff --git a/tool/mksqlite3c-noext.tcl b/tool/mksqlite3c-noext.tcl index 601b8cce8c..fad6c9e584 100644 --- a/tool/mksqlite3c-noext.tcl +++ b/tool/mksqlite3c-noext.tcl @@ -220,7 +220,7 @@ proc copy_file {filename} { if {[lsearch -exact $cdecllist $funcname] >= 0} { append line SQLITE_CDECL } else { - append line SQLITE_STDCALL + append line SQLITE_APICALL } append line " " $funcname $rest puts $out $line diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index 7e8558d2ab..b7561cfa5b 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -232,7 +232,7 @@ proc copy_file {filename} { if {[lsearch -exact $cdecllist $funcname] >= 0} { append line SQLITE_CDECL } else { - append line SQLITE_STDCALL + append line SQLITE_APICALL } append line " " $funcname $rest puts $out $line diff --git a/tool/mksqlite3h.tcl b/tool/mksqlite3h.tcl index 1af6d75730..d0ddba9cfa 100644 --- a/tool/mksqlite3h.tcl +++ b/tool/mksqlite3h.tcl @@ -120,7 +120,7 @@ foreach file $filelist { if {[lsearch -exact $cdecllist $funcname] >= 0} { append line SQLITE_CDECL } else { - append line SQLITE_STDCALL + append line SQLITE_APICALL } append line " " $funcname $rest } From 52b1dbb5fc949a629d7213661c968c722b9e5029 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 14:37:04 +0000 Subject: [PATCH 02/24] Allow the 'testfixture.exe' target to be compiled with the __stdcall calling convention. FossilOrigin-Name: e8be3dfeabaa31b3490793cf8230faae1204be15 --- Makefile.msc | 32 +++++++++--- ext/fts2/fts2_tokenizer.c | 6 ++- ext/fts3/fts3_test.c | 6 ++- ext/fts3/fts3_tokenizer.c | 6 ++- ext/fts5/fts5_tcl.c | 6 ++- ext/rbu/test_rbu.c | 12 ++++- ext/session/test_session.c | 6 ++- manifest | 99 ++++++++++++++++++-------------------- manifest.uuid | 2 +- src/tclsqlite.c | 10 ++-- src/test1.c | 6 ++- src/test2.c | 6 ++- src/test3.c | 6 ++- src/test4.c | 6 ++- src/test5.c | 6 ++- src/test6.c | 6 ++- src/test7.c | 6 ++- src/test8.c | 6 ++- src/test9.c | 6 ++- src/test_async.c | 6 ++- src/test_autoext.c | 6 ++- src/test_backup.c | 6 ++- src/test_bestindex.c | 6 ++- src/test_blob.c | 6 ++- src/test_btree.c | 6 ++- src/test_config.c | 6 ++- src/test_demovfs.c | 6 ++- src/test_fs.c | 6 ++- src/test_func.c | 6 ++- src/test_hexio.c | 6 ++- src/test_init.c | 6 ++- src/test_intarray.c | 6 ++- src/test_malloc.c | 6 ++- src/test_multiplex.c | 6 ++- src/test_mutex.c | 6 ++- src/test_osinst.c | 6 ++- src/test_quota.c | 6 ++- src/test_rtree.c | 12 ++++- src/test_schema.c | 10 ++-- src/test_superlock.c | 6 ++- src/test_syscall.c | 6 ++- src/test_tclvar.c | 6 ++- src/test_thread.c | 6 ++- src/test_vfs.c | 6 ++- tool/replace.tcl | 3 +- 45 files changed, 294 insertions(+), 108 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index 7220f71cd4..c3f7f3a2b0 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -466,12 +466,12 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS) !IF "$(PLATFORM)"=="x86" CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl !ELSE !IFNDEF PLATFORM CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl !ELSE CORE_CCONV_OPTS = SHELL_CCONV_OPTS = @@ -1239,6 +1239,12 @@ SRC11 = \ parse.h \ $(SQLITE3H) +# Generated Tcl header files +# +SRC12 = \ + sqlite_tcl.h \ + sqlite_tclDecls.h + # All source code files. # SRC = $(SRC00) $(SRC01) $(SRC02) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11) @@ -1503,7 +1509,7 @@ mptest: mptester.exe # files are automatically generated. This target takes care of # all that automatic generation. # -.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c +.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c sqlite_tcl.h -rmdir /Q/S tsrc 2>NUL -mkdir tsrc for %i in ($(SRC00)) do copy /Y %i tsrc @@ -1518,6 +1524,7 @@ mptest: mptester.exe for %i in ($(SRC09)) do copy /Y %i tsrc for %i in ($(SRC10)) do copy /Y %i tsrc for %i in ($(SRC11)) do copy /Y %i tsrc + for %i in ($(SRC12)) do copy /Y %i tsrc copy /Y fts5.c tsrc copy /Y fts5.h tsrc del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL @@ -1799,10 +1806,10 @@ wherecode.lo: $(TOP)\src\wherecode.c $(HDR) whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR) $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c -tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) +tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) sqlite_tcl.h $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c -tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) +tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) sqlite_tcl.h $(LTCOMPILE) $(NO_WARN) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS) @@ -1974,7 +1981,16 @@ TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0) TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1) !ENDIF -testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) +sqlite_tclDecls.h: + echo #ifndef SQLITE_TCLAPI > sqlite_tclDecls.h + echo # define SQLITE_TCLAPI __cdecl >> sqlite_tclDecls.h + echo #endif >> sqlite_tclDecls.h + type "$(TCLINCDIR)\tclDecls.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?.*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" >> sqlite_tclDecls.h + +sqlite_tcl.h: sqlite_tclDecls.h + type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h >> sqlite_tcl.h + +testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) sqlite_tcl.h $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \ -DBUILD_sqlite -I$(TCLINCDIR) \ $(TESTFIXTURE_SRC) \ @@ -2023,7 +2039,7 @@ smoketest: $(TESTPROGS) @set PATH=$(LIBTCLPATH);$(PATH) .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS) -sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl +sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl sqlite_tcl.h echo #define TCLSH 2 > $@ echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@ copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@ @@ -2103,7 +2119,7 @@ clean: -rmdir /Q/S .libs 2>NUL -rmdir /Q/S tsrc 2>NUL del /Q .target_source 2>NUL - del /Q tclsqlite3.exe 2>NUL + del /Q tclsqlite3.exe sqlite_tcl.h sqlite_tclDecls.h 2>NUL del /Q testloadext.dll 2>NUL del /Q testfixture.exe test.db 2>NUL del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL diff --git a/ext/fts2/fts2_tokenizer.c b/ext/fts2/fts2_tokenizer.c index a3d6a6312a..dda33a72d2 100644 --- a/ext/fts2/fts2_tokenizer.c +++ b/ext/fts2/fts2_tokenizer.c @@ -99,7 +99,11 @@ static void scalarFunc( #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include /* diff --git a/ext/fts3/fts3_test.c b/ext/fts3/fts3_test.c index 2596e6dec7..c3b71284ec 100644 --- a/ext/fts3/fts3_test.c +++ b/ext/fts3/fts3_test.c @@ -18,7 +18,11 @@ ** that the sqlite3_tokenizer_module.xLanguage() method is invoked correctly. */ -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/ext/fts3/fts3_tokenizer.c b/ext/fts3/fts3_tokenizer.c index b7d9d2b3b2..bfc36af3e3 100644 --- a/ext/fts3/fts3_tokenizer.c +++ b/ext/fts3/fts3_tokenizer.c @@ -224,7 +224,11 @@ int sqlite3Fts3InitTokenizer( #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include /* diff --git a/ext/fts5/fts5_tcl.c b/ext/fts5/fts5_tcl.c index 72db65777f..dee9bc7f18 100644 --- a/ext/fts5/fts5_tcl.c +++ b/ext/fts5/fts5_tcl.c @@ -14,7 +14,11 @@ #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #ifdef SQLITE_ENABLE_FTS5 diff --git a/ext/rbu/test_rbu.c b/ext/rbu/test_rbu.c index 6418d30d59..671f16c553 100644 --- a/ext/rbu/test_rbu.c +++ b/ext/rbu/test_rbu.c @@ -17,7 +17,11 @@ #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) #include "sqlite3rbu.h" -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include /* From main.c */ @@ -347,7 +351,11 @@ int SqliteRbu_Init(Tcl_Interp *interp){ } #else -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif int SqliteRbu_Init(Tcl_Interp *interp){ return TCL_OK; } #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */ #endif /* defined(SQLITE_TEST) */ diff --git a/ext/session/test_session.c b/ext/session/test_session.c index 1aa63b74ed..9f6bc3f70d 100644 --- a/ext/session/test_session.c +++ b/ext/session/test_session.c @@ -5,7 +5,11 @@ #include "sqlite3session.h" #include #include -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif typedef struct TestSession TestSession; struct TestSession { diff --git a/manifest b/manifest index a174c165d9..8f0151d5f2 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C Work\sin\sprogress\son\ssetting\sa\scalling\sconvention\sfor\sall\scallback\sfunctions. -D 2016-07-28T04:14:37.455 +C Allow\sthe\s'testfixture.exe'\starget\sto\sbe\scompiled\swith\sthe\s__stdcall\scalling\sconvention. +D 2016-07-28T14:37:04.758 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc 843c563182b26a358674c520d7b8d40b832e9436 +F Makefile.msc da4c9f5bc46f6f12d7313d12be18a2d2c55e06c0 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -62,7 +62,7 @@ F ext/fts2/fts2_hash.c 011a1d32de45bb1b519a1fd0048e857d6a843558 F ext/fts2/fts2_hash.h 1824b99dfd8d0225facbdb26a2c87289b2e7dcf8 F ext/fts2/fts2_icu.c 51c5cd3c04954badd329fa738c95fcdb717b5188 F ext/fts2/fts2_porter.c 2cd4a507bf3c3085fe66f59b0f2a325f65aaacf5 -F ext/fts2/fts2_tokenizer.c 3dbe8058e97afb55fff3ea844120ce3208b114cc +F ext/fts2/fts2_tokenizer.c b529493d55e55497213c37e1f31680a77746be26 F ext/fts2/fts2_tokenizer.h 27a1a99ca2d615cf7e142839b8d79e8751b4529e F ext/fts2/fts2_tokenizer1.c 07e223eecb483d448313b5f1553a4f299a7fb7a1 F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0 @@ -81,9 +81,9 @@ F ext/fts3/fts3_icu.c deb46f7020d87ea7a14a433fb7a7f4bef42a9652 F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009 F ext/fts3/fts3_snippet.c 68ae118b0f834ea53d2b89e4087fc0f0b8c4ee4e F ext/fts3/fts3_term.c 88c55a6fa1a51ab494e33dced0401a6c28791fd7 -F ext/fts3/fts3_test.c a940cf104d545ad1abf926956ce65db2aa5af0cf +F ext/fts3/fts3_test.c 7d8c9e17bc11cc245c91585ef5a47ee4a600f7b2 F ext/fts3/fts3_tokenize_vtab.c a27593ab19657166f6fa5ec073b678cc29a75860 -F ext/fts3/fts3_tokenizer.c 3cf21cd2212db17a88d4ef7da0fd8a80275979a1 +F ext/fts3/fts3_tokenizer.c a22bf311a71f3efa9d7012d8cc48fc9b0f3dace7 F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3 F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004 F ext/fts3/fts3_unicode.c a93f5edc0aff44ef8b06d7cb55b52026541ca145 @@ -107,7 +107,7 @@ F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2 F ext/fts5/fts5_index.c b429e23fabb57506f71e406997cc46b89190dc97 F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2 F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58 -F ext/fts5/fts5_tcl.c f8731e0508299bd43f1a2eff7dbeaac870768966 +F ext/fts5/fts5_tcl.c b41f04600936a2b910b5dff179e8bd050ccb34c7 F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8 @@ -255,7 +255,7 @@ F ext/rbu/rbuvacuum.test 4a977447c15c2581ab668781d9ef4294382530e0 F ext/rbu/rbuvacuum2.test 45009e127c3fb385e5c0fd5a8a63fb922a79d0ab F ext/rbu/sqlite3rbu.c 948677ee0ec57da51148e6c5f64ac68afcf36ab2 F ext/rbu/sqlite3rbu.h db8858120c9be14b60c9225f9da28221f5f6b945 -F ext/rbu/test_rbu.c 9f043b74c46c45b231f4313aed1fccb379a76fe6 +F ext/rbu/test_rbu.c c2c1859dfd69f1a55125d38009d0d49e36895780 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/rtree.c d26a815b0df1c412a6881dae8d7fd3c9c08cce68 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e @@ -301,7 +301,7 @@ F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7 F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0 F ext/session/sqlite3session.c 37485891b4add26cf61495df193c419f36556a32 F ext/session/sqlite3session.h 69bf73cfd71e58f2ae5d2aa935b2c1a541aee555 -F ext/session/test_session.c 464f2c8bf502795d95969387eb8e93f68c513c15 +F ext/session/test_session.c ebf9acf2bd70885e6245512427f800693b65dc9c F ext/userauth/sqlite3userauth.h 19cb6f0e31316d0ee4afdfb7a85ef9da3333a220 F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04 F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e @@ -392,51 +392,51 @@ F src/sqliteInt.h d25c18c1272a7811e2569c39bfc2fca96156eead F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9 -F src/tclsqlite.c 53274d5bbd66e7246c573a6b48026781d42c7efe -F src/test1.c 5ec959d088af063cac44cf1685455f3fcddecc8c -F src/test2.c 5586f43fcd9a1be0830793cf9d354082c261b25b -F src/test3.c c75c8af0eadb335236c9e61b51044c58a8f7dd59 -F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e -F src/test5.c 5a34feec76d9b3a86aab30fd4f6cc9c48cbab4c1 -F src/test6.c a684b7abd01352ab50cb79c0bf727e6b3f381a3d -F src/test7.c 9c89a4f1ed6bb13af0ed805b8d782bd83fcd57e3 -F src/test8.c fa262391d3edea6490a71bfaa8fed477ccbbac75 -F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60 -F src/test_async.c 21e11293a2f72080eda70e1124e9102044531cd8 -F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12 -F src/test_backup.c 2e6e6a081870150f20c526a2e9d0d29cda47d803 -F src/test_bestindex.c f9e6807c52aa532e4775321ce3ed8e47c907ed45 -F src/test_blob.c b2551a9b5573232db5f66f292307c37067937239 -F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f -F src/test_config.c 7003f6f35134de6f19c6588f44783e43390ea277 -F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852 +F src/tclsqlite.c e348648c28fcaa04ab8da98bf7e8a37b3629e634 +F src/test1.c a625e4d2857e0b08a9d66bdb737ce95b02326a9f +F src/test2.c ce1e56fd0983866df1dbaf6c0558f3ad726ec222 +F src/test3.c 68b6b3b17df3028deda0a79607af70ff4ac5fc52 +F src/test4.c a305bb93783fa0db03b9e5e899ec5367cf139903 +F src/test5.c 3ca6874d52d658607d2f25bb6ed88fd03ad78a6c +F src/test6.c 4fc2c870b4f41d46f11a24b5c7dcff89486442b8 +F src/test7.c 57b6dae963ff12cb6ef8389285427f07e8b042ff +F src/test8.c 33cefbf2911e12c74c6adb798cc0c8ee3287a58d +F src/test9.c 6b9792e8a692a67fcce77dfe4a2ca4744c4ece54 +F src/test_async.c 233536b7e364a4a95597d6aa6fdf07fa9351de67 +F src/test_autoext.c 2a2343174ff46477dd081b7582dc1e72c69330bc +F src/test_backup.c 7fe86c0be6c1a05a254b845a6aa32294dbdab012 +F src/test_bestindex.c 832b9968bf15d60029c1700905d56cefeb0f5dd7 +F src/test_blob.c 6af2552a059f326a107214fb13917f31a1606caf +F src/test_btree.c 3d2abd96336f1cbb760c7c5a758e74eaae98aed6 +F src/test_config.c 4d3d4a886416f369771d69a6dba926866deda788 +F src/test_demovfs.c ed337b14964a5f5ba08bf9472c94c64e88c547a7 F src/test_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58 -F src/test_fs.c f10f840ca4f8c72e4837908bd8347ac4bcab074b -F src/test_func.c 37453d346cfcf118774efd5bf6187f7e6a7e3254 -F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd -F src/test_init.c 66b33120ffe9cd853b5a905ec850d51151337b32 -F src/test_intarray.c 870124b95ec4c645d4eb84f15efb7133528fb1a5 +F src/test_fs.c 39086f99413e73f60afe2280a0ff27dfab63ab47 +F src/test_func.c 4197173afb7d8453d3d0c7f7b109226dcef52997 +F src/test_hexio.c 2ab200d91f77085bd69c721dcb2b649f036d608b +F src/test_init.c a55015461868ca979d819f8db72aa682ba068185 +F src/test_intarray.c 9fee7f930ff988dd0fc20315da4c762f77f01a78 F src/test_intarray.h f3b7672f5d1056eac563c0d6ea8480a660b1475c F src/test_journal.c d3b83f2bcb7792c709e57abddc456a2b1818643a F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd -F src/test_malloc.c 6b27e947eeeb70d11aa65406ed28d749e39b6356 -F src/test_multiplex.c eafc567ebe162e36f17b5062285dfe90461cf8e9 +F src/test_malloc.c 90cbc63ebab11d16b440d394e77bc26629829f11 +F src/test_multiplex.c a0bcea72bc981f64c9c71edf22cc503cf83e0348 F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635 -F src/test_mutex.c dbdfaff8580071f2212a0deae3325a93a737819c +F src/test_mutex.c 85021f2ffe67cdb4dfa6089f3f55f5e01cd76aea F src/test_onefile.c 416f87a28d6d673352d33fc4b1c7d39db878e50f -F src/test_osinst.c ad0233b1dabb0390e25edded4ebd79a2a61538c6 +F src/test_osinst.c 4e21c7b2709955f9907b80bfc874afb81ce1b4a7 F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00 -F src/test_quota.c 180813f43683be5725458fc1ff13ac455d8e722d +F src/test_quota.c 7c2bb6d302f9cab9d4782b1a37dd01f0c7bde071 F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d -F src/test_rtree.c 43fff4c5a01576d6d213f27472598801a247890c -F src/test_schema.c 2bdba21b82f601da69793e1f1d11bf481a79b091 +F src/test_rtree.c 0aad72f4854b01957b20c3c325eecd8512e9731d +F src/test_schema.c ab94aeab8a94486de3d2ce06567b7ee35f3a59b8 F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b -F src/test_superlock.c 06797157176eb7085027d9dd278c0d7a105e3ec9 -F src/test_syscall.c 268c072541162564a882c57f54a6fee12ef4a4d2 -F src/test_tclvar.c d86412527da65468ee6fa1b8607c65d0af736bc4 -F src/test_thread.c af391ec03d23486dffbcc250b7e58e073f172af9 -F src/test_vfs.c 4d02f38bfb8f7f273da7ba84bfe000f5babf206c +F src/test_superlock.c 9389ee2aa8f8fa7487ea2e3bf01c033c65eaf21a +F src/test_syscall.c 8313aa5d43989913c2dfd42b987e6ed29d6b8770 +F src/test_tclvar.c 0239df9e83f9adc7b21ae01dce20229dd8592e71 +F src/test_thread.c 30ae6818d21a168ef8cbceb9456411751c714cd9 +F src/test_vfs.c 2edd39d413301baf15c1d7384f21c2e8b3fca2dd F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698 F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61 F src/test_windirent.h b12055cab6227f7be10f5c19296f67c60cc5e2a5 @@ -1457,7 +1457,7 @@ F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97 F tool/opcodesum.tcl 740ed206ba8c5040018988129abbf3089a0ccf4a F tool/pagesig.c ff0ca355fd3c2398e933da5e22439bbff89b803b -F tool/replace.tcl 7727c60a04299b65a92f5e1590896fea0f25b9e0 +F tool/replace.tcl 3856f87247dde5418d16dac92fa4060813431778 F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5 F tool/run-speed-test.sh f95d19fd669b68c4c38b6b475242841d47c66076 @@ -1508,10 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 9e2b26811452a5011d0a97a689636fa4409da856 -R 6c56defa4f9211ce028bec2ac1e13231 -T *branch * callbackConv -T *sym-callbackConv * -T -sym-trunk * +P 02b8040e1add02734d2dbc6c59737ab74ff8fb18 +R ccdbec6a43a33ea0f78bbd174bf27dd8 U mistachkin -Z d50c4a0ba4b8e38dec3c91619f068656 +Z 9a093adb6bae045a3c1e5e0de6859957 diff --git a/manifest.uuid b/manifest.uuid index 57781e18c1..8d4ac6e27c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -02b8040e1add02734d2dbc6c59737ab74ff8fb18 \ No newline at end of file +e8be3dfeabaa31b3490793cf8230faae1204be15 \ No newline at end of file diff --git a/src/tclsqlite.c b/src/tclsqlite.c index e559043c08..d26c622859 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -30,10 +30,14 @@ ** If requested, include the SQLite compiler options file for MSVC. */ #if defined(INCLUDE_MSVC_H) -#include "msvc.h" +# include "msvc.h" #endif -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include /* @@ -4123,7 +4127,7 @@ static void init_all(Tcl_Interp *interp){ Sqlitetesttclvar_Init(interp); Sqlitetestfs_Init(interp); SqlitetestThread_Init(interp); - SqlitetestOnefile_Init(interp); + SqlitetestOnefile_Init(); SqlitetestOsinst_Init(interp); Sqlitetestbackup_Init(interp); Sqlitetestintarray_Init(interp); diff --git a/src/test1.c b/src/test1.c index 35c43d0ef9..e1b4fc0f31 100644 --- a/src/test1.c +++ b/src/test1.c @@ -19,7 +19,11 @@ #endif #include "vdbeInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test2.c b/src/test2.c index d16ba5016a..8946196ff3 100644 --- a/src/test2.c +++ b/src/test2.c @@ -14,7 +14,11 @@ ** testing of the SQLite library. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include #include diff --git a/src/test3.c b/src/test3.c index bfd7c30b65..f1b9f37924 100644 --- a/src/test3.c +++ b/src/test3.c @@ -15,7 +15,11 @@ */ #include "sqliteInt.h" #include "btreeInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test4.c b/src/test4.c index d689030303..85b521b060 100644 --- a/src/test4.c +++ b/src/test4.c @@ -12,7 +12,11 @@ ** Code for testing the SQLite library in a multithreaded environment. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #if SQLITE_OS_UNIX && SQLITE_THREADSAFE #include #include diff --git a/src/test5.c b/src/test5.c index 952e3325e5..2b49e408b6 100644 --- a/src/test5.c +++ b/src/test5.c @@ -17,7 +17,11 @@ */ #include "sqliteInt.h" #include "vdbeInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test6.c b/src/test6.c index 24fe725f78..e6eabf996a 100644 --- a/src/test6.c +++ b/src/test6.c @@ -16,7 +16,11 @@ */ #if SQLITE_TEST /* This file is used for testing only */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #ifndef SQLITE_OMIT_DISKIO /* This file is a no-op if disk I/O is disabled */ diff --git a/src/test7.c b/src/test7.c index 6ba3631b41..d3b789e967 100644 --- a/src/test7.c +++ b/src/test7.c @@ -13,7 +13,11 @@ ** Derived from test4.c. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif /* ** This test only works on UNIX with a SQLITE_THREADSAFE build that includes diff --git a/src/test8.c b/src/test8.c index fb781ac8fd..e635d5ed2c 100644 --- a/src/test8.c +++ b/src/test8.c @@ -14,7 +14,11 @@ ** testing of the SQLite library. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test9.c b/src/test9.c index e5993e8ff7..3c3629c0a7 100644 --- a/src/test9.c +++ b/src/test9.c @@ -15,7 +15,11 @@ ** as there is not much point in binding to Tcl. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test_async.c b/src/test_async.c index b0b943185b..8389e75dbd 100644 --- a/src/test_async.c +++ b/src/test_async.c @@ -15,7 +15,11 @@ */ #define TCL_THREADS -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #ifdef SQLITE_ENABLE_ASYNCIO diff --git a/src/test_autoext.c b/src/test_autoext.c index a5236d2390..b536cd7321 100644 --- a/src/test_autoext.c +++ b/src/test_autoext.c @@ -11,7 +11,11 @@ ************************************************************************* ** Test extension for testing the sqlite3_auto_extension() function. */ -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include "sqlite3ext.h" #ifndef SQLITE_OMIT_LOAD_EXTENSION diff --git a/src/test_backup.c b/src/test_backup.c index 6b4d6b9b1c..3e91f1f219 100644 --- a/src/test_backup.c +++ b/src/test_backup.c @@ -13,7 +13,11 @@ ** */ -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include "sqlite3.h" #include diff --git a/src/test_bestindex.c b/src/test_bestindex.c index f6f9d3eaf8..8e0ff00b52 100644 --- a/src/test_bestindex.c +++ b/src/test_bestindex.c @@ -93,7 +93,11 @@ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #ifndef SQLITE_OMIT_VIRTUALTABLE diff --git a/src/test_blob.c b/src/test_blob.c index ec2227bb39..703664190b 100644 --- a/src/test_blob.c +++ b/src/test_blob.c @@ -12,7 +12,11 @@ ** */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include #include diff --git a/src/test_btree.c b/src/test_btree.c index dfe77051b6..46860afb30 100644 --- a/src/test_btree.c +++ b/src/test_btree.c @@ -14,7 +14,11 @@ ** testing of the SQLite library. */ #include "btreeInt.h" -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif /* ** Usage: sqlite3_shared_cache_report diff --git a/src/test_config.c b/src/test_config.c index 9ce9bfcaca..1e68e58d8d 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -24,7 +24,11 @@ # include "os_win.h" #endif -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test_demovfs.c b/src/test_demovfs.c index 9410a309a6..9cc0eb0309 100644 --- a/src/test_demovfs.c +++ b/src/test_demovfs.c @@ -641,7 +641,11 @@ sqlite3_vfs *sqlite3_demovfs(void){ #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #if SQLITE_OS_UNIX static int register_demovfs( diff --git a/src/test_fs.c b/src/test_fs.c index 32026d0f38..329594a5ab 100644 --- a/src/test_fs.c +++ b/src/test_fs.c @@ -62,7 +62,11 @@ ** SELECT * FROM fstree WHERE path LIKE '/home/dan/sqlite/%' */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test_func.c b/src/test_func.c index 579177b70c..08ea98fb7a 100644 --- a/src/test_func.c +++ b/src/test_func.c @@ -13,7 +13,11 @@ ** implements new SQL functions used by the test scripts. */ #include "sqlite3.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include #include diff --git a/src/test_hexio.c b/src/test_hexio.c index b20b5ce730..88f5ed7bfa 100644 --- a/src/test_hexio.c +++ b/src/test_hexio.c @@ -18,7 +18,11 @@ ** easier and safer to build our own mechanism. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include #include diff --git a/src/test_init.c b/src/test_init.c index 502d95c052..c66b5785d0 100644 --- a/src/test_init.c +++ b/src/test_init.c @@ -27,7 +27,11 @@ #include "sqliteInt.h" #include -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif static struct Wrapped { sqlite3_pcache_methods2 pcache; diff --git a/src/test_intarray.c b/src/test_intarray.c index 70e34db3e1..c27b4597c0 100644 --- a/src/test_intarray.c +++ b/src/test_intarray.c @@ -270,7 +270,11 @@ SQLITE_API int sqlite3_intarray_bind( ** Everything below is interface for testing this module. */ #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif /* ** Routines to encode and decode pointers diff --git a/src/test_malloc.c b/src/test_malloc.c index 37612561eb..66d8a881ba 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -14,7 +14,11 @@ ** memory allocation subsystem. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include #include diff --git a/src/test_multiplex.c b/src/test_multiplex.c index ba4e61b090..dffdb44941 100644 --- a/src/test_multiplex.c +++ b/src/test_multiplex.c @@ -1229,7 +1229,11 @@ int sqlite3_multiplex_shutdown(int eForce){ /***************************** Test Code ***********************************/ #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif extern const char *sqlite3ErrName(int); diff --git a/src/test_mutex.c b/src/test_mutex.c index 995b89a4c6..22375197b7 100644 --- a/src/test_mutex.c +++ b/src/test_mutex.c @@ -12,7 +12,11 @@ ** This file contains test logic for the sqlite3_mutex interfaces. */ -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include "sqlite3.h" #include "sqliteInt.h" #include diff --git a/src/test_osinst.c b/src/test_osinst.c index e51ce77ef8..5ab8ed5c93 100644 --- a/src/test_osinst.c +++ b/src/test_osinst.c @@ -1104,7 +1104,11 @@ int sqlite3_vfslog_register(sqlite3 *db){ #if defined(SQLITE_TEST) || defined(TCLSH) -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif static int test_vfslog( void *clientData, diff --git a/src/test_quota.c b/src/test_quota.c index e8e0b34072..8ea48e5b53 100644 --- a/src/test_quota.c +++ b/src/test_quota.c @@ -1278,7 +1278,11 @@ int sqlite3_quota_remove(const char *zFilename){ /***************************** Test Code ***********************************/ #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif /* ** Argument passed to a TCL quota-over-limit callback. diff --git a/src/test_rtree.c b/src/test_rtree.c index 797ec0026c..1f15566f97 100644 --- a/src/test_rtree.c +++ b/src/test_rtree.c @@ -14,7 +14,11 @@ */ #include "sqlite3.h" -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif /* Solely for the UNUSED_PARAMETER() macro. */ #include "sqliteInt.h" @@ -353,7 +357,11 @@ static int bfs_query_func(sqlite3_rtree_query_info *p){ *************************************************************************/ #include -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif typedef struct Cube Cube; struct Cube { diff --git a/src/test_schema.c b/src/test_schema.c index 4ee18193b0..f2bd3b3520 100644 --- a/src/test_schema.c +++ b/src/test_schema.c @@ -35,10 +35,14 @@ ** to be compiled into an sqlite dynamic extension. */ #ifdef SQLITE_TEST - #include "sqliteInt.h" - #include "tcl.h" +# include "sqliteInt.h" +# if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +# else +# include "tcl.h" +# endif #else - #include "sqlite3ext.h" +# include "sqlite3ext.h" SQLITE_EXTENSION_INIT1 #endif diff --git a/src/test_superlock.c b/src/test_superlock.c index cac789842d..cad5b51f0f 100644 --- a/src/test_superlock.c +++ b/src/test_superlock.c @@ -256,7 +256,11 @@ int sqlite3demo_superlock( #ifdef SQLITE_TEST -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif struct InterpAndScript { Tcl_Interp *interp; diff --git a/src/test_syscall.c b/src/test_syscall.c index f1d5c61bc3..eab9895186 100644 --- a/src/test_syscall.c +++ b/src/test_syscall.c @@ -76,7 +76,11 @@ #include "sqliteInt.h" #include "sqlite3.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include #include diff --git a/src/test_tclvar.c b/src/test_tclvar.c index 63ed394734..95a065c853 100644 --- a/src/test_tclvar.c +++ b/src/test_tclvar.c @@ -17,7 +17,11 @@ ** access to TCL variables. */ #include "sqliteInt.h" -#include "tcl.h" +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #include #include diff --git a/src/test_thread.c b/src/test_thread.c index a4d96e1942..1fd646e769 100644 --- a/src/test_thread.c +++ b/src/test_thread.c @@ -16,7 +16,11 @@ */ #include "sqliteInt.h" -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif #if SQLITE_THREADSAFE diff --git a/src/test_vfs.c b/src/test_vfs.c index b476a42cb4..acc1c6682e 100644 --- a/src/test_vfs.c +++ b/src/test_vfs.c @@ -28,7 +28,11 @@ #include "sqlite3.h" #include "sqliteInt.h" -#include +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" +#else +# include "tcl.h" +#endif typedef struct Testvfs Testvfs; typedef struct TestvfsShm TestvfsShm; diff --git a/tool/replace.tcl b/tool/replace.tcl index b01a83accb..1ecc6dc7b5 100644 --- a/tool/replace.tcl +++ b/tool/replace.tcl @@ -7,13 +7,14 @@ set mode [string tolower [lindex $argv 0]] set from [lindex $argv 1] set to [lindex $argv 2] -if {$mode ni [list exact include]} {exit 1} +if {$mode ni [list exact regsub include]} {exit 1} if {[string length $from]==0} {exit 2} while {![eof stdin]} { set line [gets stdin] if {[eof stdin]} break switch -exact $mode { exact {set line [string map [list $from $to] $line]} + regsub {regsub -all -- $from $line $to line} include {if {[regsub -all -- $from $line $to line]==0} continue} } puts stdout $line From 4194ff65989d436a22699faac29e6f98d1beb414 Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 28 Jul 2016 15:09:02 +0000 Subject: [PATCH 03/24] Change mksqlite3h.tcl to automatically insert the SQLITE_CALLBACK calling convention macros. FossilOrigin-Name: 11ab9c9ab562df98c20abf126a8bac178aef77a8 --- manifest | 16 +-- manifest.uuid | 2 +- src/sqlite.h.in | 326 ++++++++++++++++++++------------------------ tool/mksqlite3h.tcl | 3 + 4 files changed, 159 insertions(+), 188 deletions(-) diff --git a/manifest b/manifest index 8f0151d5f2..49f48174ea 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Allow\sthe\s'testfixture.exe'\starget\sto\sbe\scompiled\swith\sthe\s__stdcall\scalling\sconvention. -D 2016-07-28T14:37:04.758 +C Change\smksqlite3h.tcl\sto\sautomatically\sinsert\sthe\sSQLITE_CALLBACK\scalling\nconvention\smacros. +D 2016-07-28T15:09:02.696 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc da4c9f5bc46f6f12d7313d12be18a2d2c55e06c0 @@ -385,7 +385,7 @@ F src/resolve.c cca3aa77b95706df5d635a2141a4d1de60ae6598 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c f3c6e9065fb34f6a23af27ec7f1f717ffbfc2ee4 F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5 -F src/sqlite.h.in a0760a3f7b1939e395a3e74d245e5bb03cd54fb1 +F src/sqlite.h.in a03063e698a43cc5c996cd341f39439a6ce58304 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9 F src/sqliteInt.h d25c18c1272a7811e2569c39bfc2fca96156eead @@ -1450,7 +1450,7 @@ F tool/mkpragmatab.tcl f0d5bb266d1d388cf86fce5ba01a891e95d72d41 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mksqlite3c-noext.tcl aa58ea3be311c81821c2cd3209f55e46b07ab656 F tool/mksqlite3c.tcl a52ead27e2ac5d4b616e945a0601f628f4328329 -F tool/mksqlite3h.tcl fab97967314e63384a3ed23fd35f0d8188352400 +F tool/mksqlite3h.tcl abaf6af11e184c0b69f117fc47ecfa351d81c219 F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl 4abcaf3267171b2faadaf9b82a0dfbaa6e98f8b7 F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 02b8040e1add02734d2dbc6c59737ab74ff8fb18 -R ccdbec6a43a33ea0f78bbd174bf27dd8 -U mistachkin -Z 9a093adb6bae045a3c1e5e0de6859957 +P e8be3dfeabaa31b3490793cf8230faae1204be15 +R 44253432508e9739e51133f1558c85ed +U drh +Z 863aa68feeed694e590c235a245cfae1 diff --git a/manifest.uuid b/manifest.uuid index 8d4ac6e27c..617643d254 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e8be3dfeabaa31b3490793cf8230faae1204be15 \ No newline at end of file +11ab9c9ab562df98c20abf126a8bac178aef77a8 \ No newline at end of file diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 009f080a86..02ae22c346 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -67,7 +67,6 @@ extern "C" { # define SQLITE_SYSAPI #endif - /* ** These no-op macros are used in front of interfaces to mark those ** interfaces as either deprecated or experimental. New applications @@ -328,7 +327,7 @@ int sqlite3_close_v2(sqlite3*); ** This is legacy and deprecated. It is included for historical ** compatibility and is not documented. */ -typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); +typedef int (*sqlite3_callback)(void*,int,char**, char**); /* ** CAPI3REF: One-Step Query Execution Interface @@ -395,7 +394,7 @@ typedef int (SQLITE_CALLBACK *sqlite3_callback)(void*,int,char**, char**); int sqlite3_exec( sqlite3*, /* An open database */ const char *sql, /* SQL to be evaluated */ - int (SQLITE_CALLBACK *callback)(void*,int,char**,char**), /* Callback func */ + int (*callback)(void*,int,char**,char**), /* Callback function */ void *, /* 1st argument to callback */ char **errmsg /* Error msg written here */ ); @@ -743,30 +742,26 @@ struct sqlite3_file { typedef struct sqlite3_io_methods sqlite3_io_methods; struct sqlite3_io_methods { int iVersion; - int (SQLITE_CALLBACK *xClose)(sqlite3_file*); - int (SQLITE_CALLBACK *xRead)(sqlite3_file*, void*, int iAmt, - sqlite3_int64 iOfst); - int (SQLITE_CALLBACK *xWrite)(sqlite3_file*, const void*, int iAmt, - sqlite3_int64 iOfst); - int (SQLITE_CALLBACK *xTruncate)(sqlite3_file*, sqlite3_int64 size); - int (SQLITE_CALLBACK *xSync)(sqlite3_file*, int flags); - int (SQLITE_CALLBACK *xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); - int (SQLITE_CALLBACK *xLock)(sqlite3_file*, int); - int (SQLITE_CALLBACK *xUnlock)(sqlite3_file*, int); - int (SQLITE_CALLBACK *xCheckReservedLock)(sqlite3_file*, int *pResOut); - int (SQLITE_CALLBACK *xFileControl)(sqlite3_file*, int op, void *pArg); - int (SQLITE_CALLBACK *xSectorSize)(sqlite3_file*); - int (SQLITE_CALLBACK *xDeviceCharacteristics)(sqlite3_file*); + int (*xClose)(sqlite3_file*); + int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); + int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); + int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); + int (*xSync)(sqlite3_file*, int flags); + int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); + int (*xLock)(sqlite3_file*, int); + int (*xUnlock)(sqlite3_file*, int); + int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); + int (*xFileControl)(sqlite3_file*, int op, void *pArg); + int (*xSectorSize)(sqlite3_file*); + int (*xDeviceCharacteristics)(sqlite3_file*); /* Methods above are valid for version 1 */ - int (SQLITE_CALLBACK *xShmMap)(sqlite3_file*, int iPg, int pgsz, int, - void volatile**); - int (SQLITE_CALLBACK *xShmLock)(sqlite3_file*, int offset, int n, int flags); - void (SQLITE_CALLBACK *xShmBarrier)(sqlite3_file*); - int (SQLITE_CALLBACK *xShmUnmap)(sqlite3_file*, int deleteFlag); + int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); + int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); + void (*xShmBarrier)(sqlite3_file*); + int (*xShmUnmap)(sqlite3_file*, int deleteFlag); /* Methods above are valid for version 2 */ - int (SQLITE_CALLBACK *xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, - void **pp); - int (SQLITE_CALLBACK *xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); + int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); + int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); /* Methods above are valid for version 3 */ /* Additional methods may be added in future releases */ }; @@ -1208,7 +1203,7 @@ typedef struct sqlite3_mutex sqlite3_mutex; ** any of these methods if the iVersion of the VFS is less than 3. */ typedef struct sqlite3_vfs sqlite3_vfs; -typedef void (SQLITE_SYSAPI *sqlite3_syscall_ptr)(void); +typedef void (*sqlite3_syscall_ptr)(void); struct sqlite3_vfs { int iVersion; /* Structure version number (currently 3) */ int szOsFile; /* Size of subclassed sqlite3_file */ @@ -1216,37 +1211,31 @@ struct sqlite3_vfs { sqlite3_vfs *pNext; /* Next registered VFS */ const char *zName; /* Name of this virtual file system */ void *pAppData; /* Pointer to application-specific data */ - int (SQLITE_CALLBACK *xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, + int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, int flags, int *pOutFlags); - int (SQLITE_CALLBACK *xDelete)(sqlite3_vfs*, const char *zName, int syncDir); - int (SQLITE_CALLBACK *xAccess)(sqlite3_vfs*, const char *zName, int flags, - int *pResOut); - int (SQLITE_CALLBACK *xFullPathname)(sqlite3_vfs*, const char *zName, - int nOut, char *zOut); - void *(SQLITE_CALLBACK *xDlOpen)(sqlite3_vfs*, const char *zFilename); - void (SQLITE_CALLBACK *xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); - void (*(SQLITE_CALLBACK *xDlSym)(sqlite3_vfs*,void*, - const char *zSymbol))(void); - void (SQLITE_CALLBACK *xDlClose)(sqlite3_vfs*, void*); - int (SQLITE_CALLBACK *xRandomness)(sqlite3_vfs*, int nByte, char *zOut); - int (SQLITE_CALLBACK *xSleep)(sqlite3_vfs*, int microseconds); - int (SQLITE_CALLBACK *xCurrentTime)(sqlite3_vfs*, double*); - int (SQLITE_CALLBACK *xGetLastError)(sqlite3_vfs*, int, char *); + int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); + int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); + int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); + void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); + void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); + void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); + void (*xDlClose)(sqlite3_vfs*, void*); + int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); + int (*xSleep)(sqlite3_vfs*, int microseconds); + int (*xCurrentTime)(sqlite3_vfs*, double*); + int (*xGetLastError)(sqlite3_vfs*, int, char *); /* ** The methods above are in version 1 of the sqlite_vfs object ** definition. Those that follow are added in version 2 or later */ - int (SQLITE_CALLBACK *xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); + int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); /* ** The methods above are in versions 1 and 2 of the sqlite_vfs object. ** Those below are for version 3 and greater. */ - int (SQLITE_CALLBACK *xSetSystemCall)(sqlite3_vfs*, const char *zName, - sqlite3_syscall_ptr); - sqlite3_syscall_ptr (SQLITE_CALLBACK *xGetSystemCall)(sqlite3_vfs*, - const char *zName); - const char *(SQLITE_CALLBACK *xNextSystemCall)(sqlite3_vfs*, - const char *zName); + int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); + sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); + const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); /* ** The methods above are in versions 1 through 3 of the sqlite_vfs object. ** New fields may be appended in future versions. The iVersion @@ -1513,13 +1502,13 @@ int sqlite3_db_config(sqlite3*, int op, ...); */ typedef struct sqlite3_mem_methods sqlite3_mem_methods; struct sqlite3_mem_methods { - void *(SQLITE_CALLBACK *xMalloc)(int); /* Memory allocation function */ - void (SQLITE_CALLBACK *xFree)(void*); /* Free a prior allocation */ - void *(SQLITE_CALLBACK *xRealloc)(void*,int); /* Resize an allocation */ - int (SQLITE_CALLBACK *xSize)(void*); /* Return the size of an allocation */ - int (SQLITE_CALLBACK *xRoundup)(int); /* Round up size to allocation size */ - int (SQLITE_CALLBACK *xInit)(void*); /* Initialize the memory allocator */ - void (SQLITE_CALLBACK *xShutdown)(void*); /* Deinitialize memory allocator */ + void *(*xMalloc)(int); /* Memory allocation function */ + void (*xFree)(void*); /* Free a prior allocation */ + void *(*xRealloc)(void*,int); /* Resize an allocation */ + int (*xSize)(void*); /* Return the size of an allocation */ + int (*xRoundup)(int); /* Round up request size to allocation size */ + int (*xInit)(void*); /* Initialize the memory allocator */ + void (*xShutdown)(void*); /* Deinitialize the memory allocator */ void *pAppData; /* Argument to xInit() and xShutdown() */ }; @@ -2253,7 +2242,7 @@ int sqlite3_complete16(const void *sql); ** A busy handler must not close the database connection ** or [prepared statement] that invoked the busy handler. */ -int sqlite3_busy_handler(sqlite3*, int(SQLITE_CALLBACK *)(void*,int), void*); +int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); /* ** CAPI3REF: Set A Busy Timeout @@ -2697,8 +2686,7 @@ void sqlite3_randomness(int N, void *P); */ int sqlite3_set_authorizer( sqlite3*, - int (SQLITE_CALLBACK *xAuth)(void*,int,const char*,const char*,const char*, - const char*), + int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pUserData ); @@ -2805,9 +2793,9 @@ int sqlite3_set_authorizer( ** subject to change in future versions of SQLite. */ SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, - void(SQLITE_CALLBACK *xTrace)(void*,const char*), void*); + void(*xTrace)(void*,const char*), void*); SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, - void(SQLITE_CALLBACK *xProfile)(void*,const char*,sqlite3_uint64), void*); + void(*xProfile)(void*,const char*,sqlite3_uint64), void*); /* ** CAPI3REF: SQL Trace Event Codes @@ -2898,7 +2886,7 @@ SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, int sqlite3_trace_v2( sqlite3*, unsigned uMask, - int(SQLITE_CALLBACK *xCallback)(unsigned,void*,void*,void*), + int(*xCallback)(unsigned,void*,void*,void*), void *pCtx ); @@ -2934,7 +2922,7 @@ int sqlite3_trace_v2( ** database connections for the meaning of "modify" in this paragraph. ** */ -void sqlite3_progress_handler(sqlite3*,int,int(SQLITE_CALLBACK *)(void*),void*); +void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); /* ** CAPI3REF: Opening A New Database Connection @@ -3765,20 +3753,17 @@ typedef struct sqlite3_context sqlite3_context; ** See also: [sqlite3_bind_parameter_count()], ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. */ -int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, - void(SQLITE_CALLBACK *)(void*)); +int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, - void(SQLITE_CALLBACK *)(void*)); + void(*)(void*)); int sqlite3_bind_double(sqlite3_stmt*, int, double); int sqlite3_bind_int(sqlite3_stmt*, int, int); int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); int sqlite3_bind_null(sqlite3_stmt*, int); -int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int, - void(SQLITE_CALLBACK *)(void*)); -int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, - void(SQLITE_CALLBACK *)(void*)); +int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); +int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, - void(SQLITE_CALLBACK *)(void*), unsigned char encoding); + void(*)(void*), unsigned char encoding); int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); @@ -4446,9 +4431,9 @@ int sqlite3_create_function( int nArg, int eTextRep, void *pApp, - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), + void (*xStep)(sqlite3_context*,int,sqlite3_value**), + void (*xFinal)(sqlite3_context*) ); int sqlite3_create_function16( sqlite3 *db, @@ -4456,9 +4441,9 @@ int sqlite3_create_function16( int nArg, int eTextRep, void *pApp, - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*) + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), + void (*xStep)(sqlite3_context*,int,sqlite3_value**), + void (*xFinal)(sqlite3_context*) ); int sqlite3_create_function_v2( sqlite3 *db, @@ -4466,10 +4451,10 @@ int sqlite3_create_function_v2( int nArg, int eTextRep, void *pApp, - void (SQLITE_CALLBACK *xFunc)(sqlite3_context*,int,sqlite3_value**), - void (SQLITE_CALLBACK *xStep)(sqlite3_context*,int,sqlite3_value**), - void (SQLITE_CALLBACK *xFinal)(sqlite3_context*), - void (SQLITE_CALLBACK *xDestroy)(void*) + void (*xFunc)(sqlite3_context*,int,sqlite3_value**), + void (*xStep)(sqlite3_context*,int,sqlite3_value**), + void (*xFinal)(sqlite3_context*), + void(*xDestroy)(void*) ); /* @@ -4511,9 +4496,8 @@ SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); SQLITE_DEPRECATED int sqlite3_global_recover(void); SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); -SQLITE_DEPRECATED int sqlite3_memory_alarm( - void(SQLITE_CALLBACK *)(void*,sqlite3_int64,int), - void*,sqlite3_int64); +SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), + void*,sqlite3_int64); #endif /* @@ -4732,8 +4716,7 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context*); ** the SQL function is running. */ void *sqlite3_get_auxdata(sqlite3_context*, int N); -void sqlite3_set_auxdata(sqlite3_context*, int N, void*, - void (SQLITE_CALLBACK *)(void*)); +void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); /* @@ -4750,7 +4733,7 @@ void sqlite3_set_auxdata(sqlite3_context*, int N, void*, ** The typedef is necessary to work around problems in certain ** C++ compilers. */ -typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); +typedef void (*sqlite3_destructor_type)(void*); #define SQLITE_STATIC ((sqlite3_destructor_type)0) #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) @@ -4869,10 +4852,9 @@ typedef void (SQLITE_CALLBACK *sqlite3_destructor_type)(void*); ** than the one containing the application-defined function that received ** the [sqlite3_context] pointer, the results are undefined. */ -void sqlite3_result_blob(sqlite3_context*, const void*, int, - void(SQLITE_CALLBACK *)(void*)); +void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); void sqlite3_result_blob64(sqlite3_context*,const void*, - sqlite3_uint64,void(SQLITE_CALLBACK *)(void*)); + sqlite3_uint64,void(*)(void*)); void sqlite3_result_double(sqlite3_context*, double); void sqlite3_result_error(sqlite3_context*, const char*, int); void sqlite3_result_error16(sqlite3_context*, const void*, int); @@ -4882,17 +4864,12 @@ void sqlite3_result_error_code(sqlite3_context*, int); void sqlite3_result_int(sqlite3_context*, int); void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); void sqlite3_result_null(sqlite3_context*); -void sqlite3_result_text(sqlite3_context*, const char*, int, - void(SQLITE_CALLBACK *)(void*)); +void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, - void(SQLITE_CALLBACK *)(void*), - unsigned char encoding); -void sqlite3_result_text16(sqlite3_context*, const void*, int, - void(SQLITE_CALLBACK *)(void*)); -void sqlite3_result_text16le(sqlite3_context*, const void*, int, - void(SQLITE_CALLBACK *)(void*)); -void sqlite3_result_text16be(sqlite3_context*, const void*, int, - void(SQLITE_CALLBACK *)(void*)); + void(*)(void*), unsigned char encoding); +void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); +void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); +void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); void sqlite3_result_value(sqlite3_context*, sqlite3_value*); void sqlite3_result_zeroblob(sqlite3_context*, int n); int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); @@ -4997,22 +4974,22 @@ int sqlite3_create_collation( const char *zName, int eTextRep, void *pArg, - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) + int(*xCompare)(void*,int,const void*,int,const void*) ); int sqlite3_create_collation_v2( sqlite3*, const char *zName, int eTextRep, void *pArg, - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*), - void(SQLITE_CALLBACK *xDestroy)(void*) + int(*xCompare)(void*,int,const void*,int,const void*), + void(*xDestroy)(void*) ); int sqlite3_create_collation16( sqlite3*, const void *zName, int eTextRep, void *pArg, - int(SQLITE_CALLBACK *xCompare)(void*,int,const void*,int,const void*) + int(*xCompare)(void*,int,const void*,int,const void*) ); /* @@ -5045,12 +5022,12 @@ int sqlite3_create_collation16( int sqlite3_collation_needed( sqlite3*, void*, - void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const char*) + void(*)(void*,sqlite3*,int eTextRep,const char*) ); int sqlite3_collation_needed16( sqlite3*, void*, - void(SQLITE_CALLBACK *)(void*,sqlite3*,int eTextRep,const void*) + void(*)(void*,sqlite3*,int eTextRep,const void*) ); #ifdef SQLITE_HAS_CODEC @@ -5349,8 +5326,8 @@ sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); ** ** See also the [sqlite3_update_hook()] interface. */ -void *sqlite3_commit_hook(sqlite3*, int(SQLITE_CALLBACK *)(void*), void*); -void *sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); +void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); +void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); /* ** CAPI3REF: Data Change Notification Callbacks @@ -5403,7 +5380,7 @@ void *sqlite3_rollback_hook(sqlite3*, void(SQLITE_CALLBACK *)(void *), void*); */ void *sqlite3_update_hook( sqlite3*, - void(SQLITE_CALLBACK *)(void *,int ,char const *,char const *,sqlite3_int64), + void(*)(void *,int ,char const *,char const *,sqlite3_int64), void* ); @@ -5730,7 +5707,7 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** See also: [sqlite3_reset_auto_extension()] ** and [sqlite3_cancel_auto_extension()] */ -int sqlite3_auto_extension(void (SQLITE_CALLBACK *xEntryPoint)(void)); +int sqlite3_auto_extension(void (*xEntryPoint)(void)); /* ** CAPI3REF: Cancel Automatic Extension Loading @@ -5742,7 +5719,7 @@ int sqlite3_auto_extension(void (SQLITE_CALLBACK *xEntryPoint)(void)); ** unregistered and it returns 0 if X was not on the list of initialization ** routines. */ -int sqlite3_cancel_auto_extension(void (SQLITE_CALLBACK *xEntryPoint)(void)); +int sqlite3_cancel_auto_extension(void (*xEntryPoint)(void)); /* ** CAPI3REF: Reset Automatic Extension Loading @@ -5787,41 +5764,37 @@ typedef struct sqlite3_module sqlite3_module; */ struct sqlite3_module { int iVersion; - int (SQLITE_CALLBACK *xCreate)(sqlite3*, void *pAux, + int (*xCreate)(sqlite3*, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVTab, char**); - int (SQLITE_CALLBACK *xConnect)(sqlite3*, void *pAux, + int (*xConnect)(sqlite3*, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVTab, char**); - int (SQLITE_CALLBACK *xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); - int (SQLITE_CALLBACK *xDisconnect)(sqlite3_vtab *pVTab); - int (SQLITE_CALLBACK *xDestroy)(sqlite3_vtab *pVTab); - int (SQLITE_CALLBACK *xOpen)(sqlite3_vtab *pVTab, - sqlite3_vtab_cursor **ppCursor); - int (SQLITE_CALLBACK *xClose)(sqlite3_vtab_cursor*); - int (SQLITE_CALLBACK *xFilter)(sqlite3_vtab_cursor*, - int idxNum, const char *idxStr, - int argc, sqlite3_value **argv); - int (SQLITE_CALLBACK *xNext)(sqlite3_vtab_cursor*); - int (SQLITE_CALLBACK *xEof)(sqlite3_vtab_cursor*); - int (SQLITE_CALLBACK *xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); - int (SQLITE_CALLBACK *xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); - int (SQLITE_CALLBACK *xUpdate)(sqlite3_vtab *, int, sqlite3_value **, - sqlite3_int64 *); - int (SQLITE_CALLBACK *xBegin)(sqlite3_vtab *pVTab); - int (SQLITE_CALLBACK *xSync)(sqlite3_vtab *pVTab); - int (SQLITE_CALLBACK *xCommit)(sqlite3_vtab *pVTab); - int (SQLITE_CALLBACK *xRollback)(sqlite3_vtab *pVTab); - int (SQLITE_CALLBACK *xFindFunction)(sqlite3_vtab *pVtab, - int nArg, const char *zName, - void (SQLITE_CALLBACK **pxFunc)(sqlite3_context*,int,sqlite3_value**), - void **ppArg); - int (SQLITE_CALLBACK *xRename)(sqlite3_vtab *pVtab, const char *zNew); + int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); + int (*xDisconnect)(sqlite3_vtab *pVTab); + int (*xDestroy)(sqlite3_vtab *pVTab); + int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); + int (*xClose)(sqlite3_vtab_cursor*); + int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, + int argc, sqlite3_value **argv); + int (*xNext)(sqlite3_vtab_cursor*); + int (*xEof)(sqlite3_vtab_cursor*); + int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); + int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); + int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); + int (*xBegin)(sqlite3_vtab *pVTab); + int (*xSync)(sqlite3_vtab *pVTab); + int (*xCommit)(sqlite3_vtab *pVTab); + int (*xRollback)(sqlite3_vtab *pVTab); + int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, + void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), + void **ppArg); + int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); /* The methods above are in version 1 of the sqlite_module object. Those ** below are for version 2 and greater. */ - int (SQLITE_CALLBACK *xSavepoint)(sqlite3_vtab *pVTab, int); - int (SQLITE_CALLBACK *xRelease)(sqlite3_vtab *pVTab, int); - int (SQLITE_CALLBACK *xRollbackTo)(sqlite3_vtab *pVTab, int); + int (*xSavepoint)(sqlite3_vtab *pVTab, int); + int (*xRelease)(sqlite3_vtab *pVTab, int); + int (*xRollbackTo)(sqlite3_vtab *pVTab, int); }; /* @@ -6010,7 +5983,7 @@ int sqlite3_create_module_v2( const char *zName, /* Name of the module */ const sqlite3_module *p, /* Methods for the module */ void *pClientData, /* Client data for xCreate/xConnect */ - void(SQLITE_CALLBACK *xDestroy)(void*) /* Module destructor function */ + void(*xDestroy)(void*) /* Module destructor function */ ); /* @@ -6551,15 +6524,15 @@ void sqlite3_mutex_leave(sqlite3_mutex*); */ typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; struct sqlite3_mutex_methods { - int (SQLITE_CALLBACK *xMutexInit)(void); - int (SQLITE_CALLBACK *xMutexEnd)(void); - sqlite3_mutex *(SQLITE_CALLBACK *xMutexAlloc)(int); - void (SQLITE_CALLBACK *xMutexFree)(sqlite3_mutex *); - void (SQLITE_CALLBACK *xMutexEnter)(sqlite3_mutex *); - int (SQLITE_CALLBACK *xMutexTry)(sqlite3_mutex *); - void (SQLITE_CALLBACK *xMutexLeave)(sqlite3_mutex *); - int (SQLITE_CALLBACK *xMutexHeld)(sqlite3_mutex *); - int (SQLITE_CALLBACK *xMutexNotheld)(sqlite3_mutex *); + int (*xMutexInit)(void); + int (*xMutexEnd)(void); + sqlite3_mutex *(*xMutexAlloc)(int); + void (*xMutexFree)(sqlite3_mutex *); + void (*xMutexEnter)(sqlite3_mutex *); + int (*xMutexTry)(sqlite3_mutex *); + void (*xMutexLeave)(sqlite3_mutex *); + int (*xMutexHeld)(sqlite3_mutex *); + int (*xMutexNotheld)(sqlite3_mutex *); }; /* @@ -7255,21 +7228,18 @@ typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; struct sqlite3_pcache_methods2 { int iVersion; void *pArg; - int (SQLITE_CALLBACK *xInit)(void*); - void (SQLITE_CALLBACK *xShutdown)(void*); - sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int szExtra, - int bPurgeable); - void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); - int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); - sqlite3_pcache_page *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, - int createFlag); - void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, - int discard); - void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, - unsigned oldKey, unsigned newKey); - void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); - void (SQLITE_CALLBACK *xShrink)(sqlite3_pcache*); + int (*xInit)(void*); + void (*xShutdown)(void*); + sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); + void (*xCachesize)(sqlite3_pcache*, int nCachesize); + int (*xPagecount)(sqlite3_pcache*); + sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); + void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); + void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, + unsigned oldKey, unsigned newKey); + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); + void (*xDestroy)(sqlite3_pcache*); + void (*xShrink)(sqlite3_pcache*); }; /* @@ -7280,18 +7250,16 @@ struct sqlite3_pcache_methods2 { typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; struct sqlite3_pcache_methods { void *pArg; - int (SQLITE_CALLBACK *xInit)(void*); - void (SQLITE_CALLBACK *xShutdown)(void*); - sqlite3_pcache *(SQLITE_CALLBACK *xCreate)(int szPage, int bPurgeable); - void (SQLITE_CALLBACK *xCachesize)(sqlite3_pcache*, int nCachesize); - int (SQLITE_CALLBACK *xPagecount)(sqlite3_pcache*); - void *(SQLITE_CALLBACK *xFetch)(sqlite3_pcache*, unsigned key, - int createFlag); - void (SQLITE_CALLBACK *xUnpin)(sqlite3_pcache*, void*, int discard); - void (SQLITE_CALLBACK *xRekey)(sqlite3_pcache*, void*, unsigned oldKey, - unsigned newKey); - void (SQLITE_CALLBACK *xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (SQLITE_CALLBACK *xDestroy)(sqlite3_pcache*); + int (*xInit)(void*); + void (*xShutdown)(void*); + sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); + void (*xCachesize)(sqlite3_pcache*, int nCachesize); + int (*xPagecount)(sqlite3_pcache*); + void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); + void (*xUnpin)(sqlite3_pcache*, void*, int discard); + void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); + void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); + void (*xDestroy)(sqlite3_pcache*); }; @@ -7621,7 +7589,7 @@ int sqlite3_backup_pagecount(sqlite3_backup *p); */ int sqlite3_unlock_notify( sqlite3 *pBlocked, /* Waiting connection */ - void (SQLITE_CALLBACK *xNotify)(void **apArg, int nArg), /* Callback func */ + void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ void *pNotifyArg /* Argument to pass to xNotify */ ); @@ -7736,7 +7704,7 @@ void sqlite3_log(int iErrCode, const char *zFormat, ...); */ void *sqlite3_wal_hook( sqlite3*, - int(SQLITE_CALLBACK *)(void *,sqlite3*,const char*,int), + int(*)(void *,sqlite3*,const char*,int), void* ); @@ -8209,7 +8177,7 @@ int sqlite3_db_cacheflush(sqlite3*); */ SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( sqlite3 *db, - void(SQLITE_CALLBACK *xPreUpdate)( + void(*xPreUpdate)( void *pCtx, /* Copy of third arg to preupdate_hook() */ sqlite3 *db, /* Database handle */ int op, /* SQLITE_UPDATE, DELETE or INSERT */ diff --git a/tool/mksqlite3h.tcl b/tool/mksqlite3h.tcl index d0ddba9cfa..4b7d10b69f 100644 --- a/tool/mksqlite3h.tcl +++ b/tool/mksqlite3h.tcl @@ -21,6 +21,8 @@ # formatted as an integer (e.g. "3006017"). # 5) Replaces the string --SOURCE-ID-- with the date and time and sha1 # hash of the fossil-scm manifest for the source tree. +# 6) Adds the SQLITE_CALLBACK calling convention macro in front of all +# callback declarations. # # This script outputs to stdout. # @@ -125,6 +127,7 @@ foreach file $filelist { append line " " $funcname $rest } } + regsub {\(\*} $line {(SQLITE_CALLBACK *} line puts $line } close $in From fe0c0d2088cedf1c2e46d2ddf85938251fcb52de Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 15:38:34 +0000 Subject: [PATCH 04/24] Modify the mksqlite3h.tcl tool to handle the syscall typedef specially. FossilOrigin-Name: 478a84efa6ea13629227ba8970c8ef8545d31074 --- manifest | 14 +++++++------- manifest.uuid | 2 +- tool/mksqlite3h.tcl | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 49f48174ea..3195058bae 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Change\smksqlite3h.tcl\sto\sautomatically\sinsert\sthe\sSQLITE_CALLBACK\scalling\nconvention\smacros. -D 2016-07-28T15:09:02.696 +C Modify\sthe\smksqlite3h.tcl\stool\sto\shandle\sthe\ssyscall\stypedef\sspecially. +D 2016-07-28T15:38:34.103 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc da4c9f5bc46f6f12d7313d12be18a2d2c55e06c0 @@ -1450,7 +1450,7 @@ F tool/mkpragmatab.tcl f0d5bb266d1d388cf86fce5ba01a891e95d72d41 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mksqlite3c-noext.tcl aa58ea3be311c81821c2cd3209f55e46b07ab656 F tool/mksqlite3c.tcl a52ead27e2ac5d4b616e945a0601f628f4328329 -F tool/mksqlite3h.tcl abaf6af11e184c0b69f117fc47ecfa351d81c219 +F tool/mksqlite3h.tcl cf5cd68028e69a51ed5c76042672664201f0f756 F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl 4abcaf3267171b2faadaf9b82a0dfbaa6e98f8b7 F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P e8be3dfeabaa31b3490793cf8230faae1204be15 -R 44253432508e9739e51133f1558c85ed -U drh -Z 863aa68feeed694e590c235a245cfae1 +P 11ab9c9ab562df98c20abf126a8bac178aef77a8 +R a69c68c4276ee266722a065a80ccdc75 +U mistachkin +Z 9a266ac1c40bfd5d57e83258cb2d1dad diff --git a/manifest.uuid b/manifest.uuid index 617643d254..f316f522bd 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -11ab9c9ab562df98c20abf126a8bac178aef77a8 \ No newline at end of file +478a84efa6ea13629227ba8970c8ef8545d31074 \ No newline at end of file diff --git a/tool/mksqlite3h.tcl b/tool/mksqlite3h.tcl index 4b7d10b69f..9a4e7d2985 100644 --- a/tool/mksqlite3h.tcl +++ b/tool/mksqlite3h.tcl @@ -127,6 +127,8 @@ foreach file $filelist { append line " " $funcname $rest } } + set line [string map [list (*sqlite3_syscall_ptr) \ + "(SQLITE_SYSAPI *sqlite3_syscall_ptr)"] $line] regsub {\(\*} $line {(SQLITE_CALLBACK *} line puts $line } From f27a80cf185c97e66a5808e2634d41fe30942fed Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 16:09:52 +0000 Subject: [PATCH 05/24] More work on getting the 'testfixture.exe' target to work correctly. FossilOrigin-Name: 36b72fd609cf151f3db0e65b450d7cd515f2ac49 --- Makefile.msc | 22 +++++++++++++++++++--- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index c3f7f3a2b0..4a8283731d 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -466,22 +466,30 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS) !IF "$(PLATFORM)"=="x86" CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +# <> TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl +# <> !ELSE !IFNDEF PLATFORM CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall +# <> TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl +# <> !ELSE CORE_CCONV_OPTS = SHELL_CCONV_OPTS = +# <> TEST_CCONV_OPTS = +# <> !ENDIF !ENDIF !ELSE CORE_CCONV_OPTS = SHELL_CCONV_OPTS = +# <> TEST_CCONV_OPTS = +# <> !ENDIF # These are additional compiler options used for the core library. @@ -1983,12 +1991,20 @@ TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1) sqlite_tclDecls.h: echo #ifndef SQLITE_TCLAPI > sqlite_tclDecls.h - echo # define SQLITE_TCLAPI __cdecl >> sqlite_tclDecls.h + echo # define SQLITE_TCLAPI >> sqlite_tclDecls.h echo #endif >> sqlite_tclDecls.h - type "$(TCLINCDIR)\tclDecls.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?.*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" >> sqlite_tclDecls.h + type "$(TCLINCDIR)\tclDecls.h" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?.*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" >> sqlite_tclDecls.h sqlite_tcl.h: sqlite_tclDecls.h - type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h >> sqlite_tcl.h + type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> sqlite_tcl.h testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) sqlite_tcl.h $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \ diff --git a/manifest b/manifest index 3195058bae..cb678be722 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C Modify\sthe\smksqlite3h.tcl\stool\sto\shandle\sthe\ssyscall\stypedef\sspecially. -D 2016-07-28T15:38:34.103 +C More\swork\son\sgetting\sthe\s'testfixture.exe'\starget\sto\swork\scorrectly. +D 2016-07-28T16:09:52.017 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc da4c9f5bc46f6f12d7313d12be18a2d2c55e06c0 +F Makefile.msc 1e5399407885d69150e2659f4710b5712a1e6cef F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 11ab9c9ab562df98c20abf126a8bac178aef77a8 -R a69c68c4276ee266722a065a80ccdc75 +P 478a84efa6ea13629227ba8970c8ef8545d31074 +R 88324b2461565133820c548ccb01cb7e U mistachkin -Z 9a266ac1c40bfd5d57e83258cb2d1dad +Z 92e347019c063e4a6ca0b5b196166511 diff --git a/manifest.uuid b/manifest.uuid index f316f522bd..132e64c427 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -478a84efa6ea13629227ba8970c8ef8545d31074 \ No newline at end of file +36b72fd609cf151f3db0e65b450d7cd515f2ac49 \ No newline at end of file From 7617e4a8a4564689a839cf116dae0012b4753a65 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 17:11:20 +0000 Subject: [PATCH 06/24] Make sure the SQLITE_TCLAPI macro is always defined. FossilOrigin-Name: f2f1323cc4d2ad2d6794dbfae8d50b747213e85d --- ext/fts3/fts3_test.c | 11 +- manifest | 82 +++++----- manifest.uuid | 2 +- src/sqliteInt.h | 8 + src/tclsqlite.c | 47 ++++-- src/test1.c | 360 +++++++++++++++++++++---------------------- src/test2.c | 40 ++--- src/test3.c | 30 ++-- src/test4.c | 30 ++-- src/test5.c | 8 +- src/test6.c | 14 +- src/test7.c | 26 ++-- src/test8.c | 4 +- src/test9.c | 6 +- src/test_async.c | 13 +- src/test_autoext.c | 17 +- src/test_backup.c | 9 +- src/test_bestindex.c | 2 +- src/test_blob.c | 10 +- src/test_btree.c | 2 +- src/test_demovfs.c | 7 +- src/test_fs.c | 2 +- src/test_func.c | 4 +- src/test_hexio.c | 14 +- src/test_init.c | 8 +- src/test_intarray.c | 7 +- src/test_malloc.c | 64 ++++---- src/test_multiplex.c | 11 +- src/test_mutex.c | 22 +-- src/test_osinst.c | 5 +- src/test_quota.c | 73 ++++----- src/test_rtree.c | 4 +- src/test_schema.c | 2 +- src/test_superlock.c | 9 +- src/test_syscall.c | 20 +-- src/test_tclvar.c | 2 +- src/test_thread.c | 18 +-- src/test_vfs.c | 6 +- 38 files changed, 530 insertions(+), 469 deletions(-) diff --git a/ext/fts3/fts3_test.c b/ext/fts3/fts3_test.c index c3b71284ec..a48a556c98 100644 --- a/ext/fts3/fts3_test.c +++ b/ext/fts3/fts3_test.c @@ -22,6 +22,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #include #include @@ -147,7 +150,7 @@ static int nm_match_count( /* ** Tclcmd: fts3_near_match DOCUMENT EXPR ?OPTIONS? */ -static int fts3_near_match_cmd( +static int SQLITE_TCLAPI fts3_near_match_cmd( ClientData clientData, Tcl_Interp *interp, int objc, @@ -282,7 +285,7 @@ static int fts3_near_match_cmd( ** # Restore initial incr-load settings: ** eval fts3_configure_incr_load $cfg */ -static int fts3_configure_incr_load_cmd( +static int SQLITE_TCLAPI fts3_configure_incr_load_cmd( ClientData clientData, Tcl_Interp *interp, int objc, @@ -492,7 +495,7 @@ static int testTokenizerLanguage( } #endif -static int fts3_test_tokenizer_cmd( +static int SQLITE_TCLAPI fts3_test_tokenizer_cmd( ClientData clientData, Tcl_Interp *interp, int objc, @@ -521,7 +524,7 @@ static int fts3_test_tokenizer_cmd( return TCL_OK; } -static int fts3_test_varint_cmd( +static int SQLITE_TCLAPI fts3_test_varint_cmd( ClientData clientData, Tcl_Interp *interp, int objc, diff --git a/manifest b/manifest index cb678be722..1be1262c7e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C More\swork\son\sgetting\sthe\s'testfixture.exe'\starget\sto\swork\scorrectly. -D 2016-07-28T16:09:52.017 +C Make\ssure\sthe\sSQLITE_TCLAPI\smacro\sis\salways\sdefined. +D 2016-07-28T17:11:20.162 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 1e5399407885d69150e2659f4710b5712a1e6cef @@ -81,7 +81,7 @@ F ext/fts3/fts3_icu.c deb46f7020d87ea7a14a433fb7a7f4bef42a9652 F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009 F ext/fts3/fts3_snippet.c 68ae118b0f834ea53d2b89e4087fc0f0b8c4ee4e F ext/fts3/fts3_term.c 88c55a6fa1a51ab494e33dced0401a6c28791fd7 -F ext/fts3/fts3_test.c 7d8c9e17bc11cc245c91585ef5a47ee4a600f7b2 +F ext/fts3/fts3_test.c 79f2a7fbb3f672fa032e5a432ca274ea3ee93c34 F ext/fts3/fts3_tokenize_vtab.c a27593ab19657166f6fa5ec073b678cc29a75860 F ext/fts3/fts3_tokenizer.c a22bf311a71f3efa9d7012d8cc48fc9b0f3dace7 F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3 @@ -388,55 +388,55 @@ F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5 F src/sqlite.h.in a03063e698a43cc5c996cd341f39439a6ce58304 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9 -F src/sqliteInt.h d25c18c1272a7811e2569c39bfc2fca96156eead +F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052 F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9 -F src/tclsqlite.c e348648c28fcaa04ab8da98bf7e8a37b3629e634 -F src/test1.c a625e4d2857e0b08a9d66bdb737ce95b02326a9f -F src/test2.c ce1e56fd0983866df1dbaf6c0558f3ad726ec222 -F src/test3.c 68b6b3b17df3028deda0a79607af70ff4ac5fc52 -F src/test4.c a305bb93783fa0db03b9e5e899ec5367cf139903 -F src/test5.c 3ca6874d52d658607d2f25bb6ed88fd03ad78a6c -F src/test6.c 4fc2c870b4f41d46f11a24b5c7dcff89486442b8 -F src/test7.c 57b6dae963ff12cb6ef8389285427f07e8b042ff -F src/test8.c 33cefbf2911e12c74c6adb798cc0c8ee3287a58d -F src/test9.c 6b9792e8a692a67fcce77dfe4a2ca4744c4ece54 -F src/test_async.c 233536b7e364a4a95597d6aa6fdf07fa9351de67 -F src/test_autoext.c 2a2343174ff46477dd081b7582dc1e72c69330bc -F src/test_backup.c 7fe86c0be6c1a05a254b845a6aa32294dbdab012 -F src/test_bestindex.c 832b9968bf15d60029c1700905d56cefeb0f5dd7 -F src/test_blob.c 6af2552a059f326a107214fb13917f31a1606caf -F src/test_btree.c 3d2abd96336f1cbb760c7c5a758e74eaae98aed6 +F src/tclsqlite.c a9c6e33c44efa93d176ce5e0887d5d533c98b429 +F src/test1.c 906a04b649c7139e943193a3905d583e325c30c7 +F src/test2.c b7174313e993754303a8b33c43df7c44b46857ab +F src/test3.c 1339a40be39650ae83894b6578f971dc7f96ea8a +F src/test4.c 18ec393bb4d0ad1de729f0b94da7267270f3d8e6 +F src/test5.c 328aae2c010c57a9829d255dc099d6899311672d +F src/test6.c 55aa2775c154415dcf4ed7cd1e19a193122b3a02 +F src/test7.c 5612e9aecf934d6df7bba6ce861fdf5ba5456010 +F src/test8.c 4f4904721167b32f7a4fa8c7b32a07a673d6cc86 +F src/test9.c 12e5ba554d2d1cbe0158f6ab3f7ffcd7a86ee4e5 +F src/test_async.c 195ab49da082053fdb0f949c114b806a49ca770a +F src/test_autoext.c 6c8fe00caa3f38396f0990467179e9d1adb39ddd +F src/test_backup.c bf5da90c9926df0a4b941f2d92825a01bbe090a0 +F src/test_bestindex.c d23f80d334c59662af69191854c76b8d3d0c8c96 +F src/test_blob.c a0f7ad49a0c9d4b72f693fe2a71c58d7e507174d +F src/test_btree.c 8b2dc8b8848cf3a4db93f11578f075e82252a274 F src/test_config.c 4d3d4a886416f369771d69a6dba926866deda788 -F src/test_demovfs.c ed337b14964a5f5ba08bf9472c94c64e88c547a7 +F src/test_demovfs.c a0c3bdd45ed044115c2c9f7779e56eafff18741e F src/test_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58 -F src/test_fs.c 39086f99413e73f60afe2280a0ff27dfab63ab47 -F src/test_func.c 4197173afb7d8453d3d0c7f7b109226dcef52997 -F src/test_hexio.c 2ab200d91f77085bd69c721dcb2b649f036d608b -F src/test_init.c a55015461868ca979d819f8db72aa682ba068185 -F src/test_intarray.c 9fee7f930ff988dd0fc20315da4c762f77f01a78 +F src/test_fs.c ac62ce7d5c0c23aa6932891cad5746945564c91c +F src/test_func.c 9cea6fee7ece5f46aa26e060b35e10dc6ba708cf +F src/test_hexio.c 1d4469ca61ab202a1fcec6543f584d2407205e8d +F src/test_init.c 4413c211a94b62157ca4c145b3f27c497f03c664 +F src/test_intarray.c 988fc61cb0ff539f4172c0d95f15287c92516f64 F src/test_intarray.h f3b7672f5d1056eac563c0d6ea8480a660b1475c F src/test_journal.c d3b83f2bcb7792c709e57abddc456a2b1818643a F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd -F src/test_malloc.c 90cbc63ebab11d16b440d394e77bc26629829f11 -F src/test_multiplex.c a0bcea72bc981f64c9c71edf22cc503cf83e0348 +F src/test_malloc.c c05f6c40bd6c8bfe5f1718212f81fd5687f91766 +F src/test_multiplex.c af2792ec4436d442d1bd00b8803470a25111bad3 F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635 -F src/test_mutex.c 85021f2ffe67cdb4dfa6089f3f55f5e01cd76aea +F src/test_mutex.c 7f4337ba23ee6b1d2ec81c189653608cb069926a F src/test_onefile.c 416f87a28d6d673352d33fc4b1c7d39db878e50f -F src/test_osinst.c 4e21c7b2709955f9907b80bfc874afb81ce1b4a7 +F src/test_osinst.c 98ef31ff03d55497829ca0f6c74a9f4e1aa48690 F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00 -F src/test_quota.c 7c2bb6d302f9cab9d4782b1a37dd01f0c7bde071 +F src/test_quota.c 6cb9297115b551f433a9ad1741817a9831abed99 F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d -F src/test_rtree.c 0aad72f4854b01957b20c3c325eecd8512e9731d -F src/test_schema.c ab94aeab8a94486de3d2ce06567b7ee35f3a59b8 +F src/test_rtree.c 671f3fae50ff116ef2e32a3bf1fe21b5615b4b7b +F src/test_schema.c f575932cb6274d12147a77e13ea4b49d52408513 F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b -F src/test_superlock.c 9389ee2aa8f8fa7487ea2e3bf01c033c65eaf21a -F src/test_syscall.c 8313aa5d43989913c2dfd42b987e6ed29d6b8770 -F src/test_tclvar.c 0239df9e83f9adc7b21ae01dce20229dd8592e71 -F src/test_thread.c 30ae6818d21a168ef8cbceb9456411751c714cd9 -F src/test_vfs.c 2edd39d413301baf15c1d7384f21c2e8b3fca2dd +F src/test_superlock.c 4839644b9201da822f181c5bc406c0b2385f672e +F src/test_syscall.c 1073306ba2e9bfc886771871a13d3de281ed3939 +F src/test_tclvar.c df9fe1213c2634687a9ca0b0bec0d2119d359ae3 +F src/test_thread.c c7c40494b7a0603ebb6eb97c904545c0dceca5ff +F src/test_vfs.c f0186261a24de2671d080bcd8050732f0cb64f6e F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698 F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61 F src/test_windirent.h b12055cab6227f7be10f5c19296f67c60cc5e2a5 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 478a84efa6ea13629227ba8970c8ef8545d31074 -R 88324b2461565133820c548ccb01cb7e +P 36b72fd609cf151f3db0e65b450d7cd515f2ac49 +R cb104ece8c53bb381905efecad762caf U mistachkin -Z 92e347019c063e4a6ca0b5b196166511 +Z 5c80ddf3854cd75da2e73aafdf02283f diff --git a/manifest.uuid b/manifest.uuid index 132e64c427..1a85a325af 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -36b72fd609cf151f3db0e65b450d7cd515f2ac49 \ No newline at end of file +f2f1323cc4d2ad2d6794dbfae8d50b747213e85d \ No newline at end of file diff --git a/src/sqliteInt.h b/src/sqliteInt.h index c5b1eccc03..35be76dfb0 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -42,6 +42,14 @@ ** asterisks and the comment text. */ +/* +** Make sure the Tcl calling convention macro is defined. This macro is +** only used by test code and Tcl integration code. +*/ +#ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +#endif + /* ** Make sure that rand_s() is available on Windows systems with MSVC 2005 ** or higher. diff --git a/src/tclsqlite.c b/src/tclsqlite.c index d26c622859..527dc488ee 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -37,6 +37,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #include @@ -208,7 +211,10 @@ static void closeIncrblobChannels(SqliteDb *pDb){ /* ** Close an incremental blob channel. */ -static int incrblobClose(ClientData instanceData, Tcl_Interp *interp){ +static int SQLITE_TCLAPI incrblobClose( + ClientData instanceData, + Tcl_Interp *interp +){ IncrblobChannel *p = (IncrblobChannel *)instanceData; int rc = sqlite3_blob_close(p->pBlob); sqlite3 *db = p->pDb->db; @@ -237,7 +243,7 @@ static int incrblobClose(ClientData instanceData, Tcl_Interp *interp){ /* ** Read data from an incremental blob channel. */ -static int incrblobInput( +static int SQLITE_TCLAPI incrblobInput( ClientData instanceData, char *buf, int bufSize, @@ -269,7 +275,7 @@ static int incrblobInput( /* ** Write data to an incremental blob channel. */ -static int incrblobOutput( +static int SQLITE_TCLAPI incrblobOutput( ClientData instanceData, CONST char *buf, int toWrite, @@ -302,7 +308,7 @@ static int incrblobOutput( /* ** Seek an incremental blob channel. */ -static int incrblobSeek( +static int SQLITE_TCLAPI incrblobSeek( ClientData instanceData, long offset, int seekMode, @@ -328,10 +334,17 @@ static int incrblobSeek( } -static void incrblobWatch(ClientData instanceData, int mode){ +static void SQLITE_TCLAPI incrblobWatch( + ClientData instanceData, + int mode +){ /* NO-OP */ } -static int incrblobHandle(ClientData instanceData, int dir, ClientData *hPtr){ +static int SQLITE_TCLAPI incrblobHandle( + ClientData instanceData, + int dir, + ClientData *hPtr +){ return TCL_ERROR; } @@ -490,7 +503,7 @@ static void flushStmtCache(SqliteDb *pDb){ ** TCL calls this procedure when an sqlite3 database command is ** deleted. */ -static void DbDeleteCmd(void *db){ +static void SQLITE_TCLAPI DbDeleteCmd(void *db){ SqliteDb *pDb = (SqliteDb*)db; flushStmtCache(pDb); closeIncrblobChannels(pDb); @@ -1795,7 +1808,12 @@ static void DbHookCmd( ** and calls that connection "db1". The second command causes this ** subroutine to be invoked. */ -static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ +static int SQLITE_TCLAPI DbObjCmd( + void *cd, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const*objv +){ SqliteDb *pDb = (SqliteDb*)cd; int choice; int rc = TCL_OK; @@ -3263,7 +3281,12 @@ static int DbObjCmdAdaptor( ** The second argument is the name of the database file. ** */ -static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ +static int SQLITE_TCLAPI DbMain( + void *cd, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const*objv +){ SqliteDb *p; const char *zArg; char *zErrMsg; @@ -3935,7 +3958,7 @@ static const char *tclsh_main_loop(void); #ifdef SQLITE_TEST static void init_all(Tcl_Interp *); -static int init_all_cmd( +static int SQLITE_TCLAPI init_all_cmd( ClientData cd, Tcl_Interp *interp, int objc, @@ -3965,7 +3988,7 @@ static int init_all_cmd( ** to use the sqlite3_prepare_v2() function to prepare statements. If it ** is false, sqlite3_prepare(). */ -static int db_use_legacy_prepare_cmd( +static int SQLITE_TCLAPI db_use_legacy_prepare_cmd( ClientData cd, Tcl_Interp *interp, int objc, @@ -4002,7 +4025,7 @@ static int db_use_legacy_prepare_cmd( ** return the text representation of the most recently used statement ** handle. */ -static int db_last_stmt_ptr( +static int SQLITE_TCLAPI db_last_stmt_ptr( ClientData cd, Tcl_Interp *interp, int objc, diff --git a/src/test1.c b/src/test1.c index e1b4fc0f31..ec6d8ecff3 100644 --- a/src/test1.c +++ b/src/test1.c @@ -79,7 +79,7 @@ void *sqlite3TestTextToPtr(const char *z){ ** for an sqlite connection instance. Bad things happen if the ** input is not an sqlite connection. */ -static int get_sqlite_pointer( +static int SQLITE_TCLAPI get_sqlite_pointer( void * clientData, Tcl_Interp *interp, int objc, @@ -225,7 +225,7 @@ static void io_trace_callback(const char *zFormat, ...){ ** I/O tracing begins going into FILENAME. If FILENAME is an empty ** string, I/O tracing is turned off. */ -static int test_io_trace( +static int SQLITE_TCLAPI test_io_trace( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -266,7 +266,7 @@ static int test_io_trace( ** ** Also return true if the OMIT_MISUSE environment variable exists. */ -static int clang_sanitize_address( +static int SQLITE_TCLAPI clang_sanitize_address( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -293,7 +293,7 @@ static int clang_sanitize_address( ** DB. The SQL is the string FORMAT. The format string should contain ** one %s or %q. STRING is the value inserted into %s or %q. */ -static int test_exec_printf( +static int SQLITE_TCLAPI test_exec_printf( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -331,7 +331,7 @@ static int test_exec_printf( ** HEX into ASCII. Most characters are translated as is. %HH becomes ** a hex character. */ -static int test_exec_hex( +static int SQLITE_TCLAPI test_exec_hex( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -377,7 +377,7 @@ static int test_exec_hex( ** ** Enter or leave the mutex on a database connection. */ -static int db_enter( +static int SQLITE_TCLAPI db_enter( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -393,7 +393,7 @@ static int db_enter( sqlite3_mutex_enter(db->mutex); return TCL_OK; } -static int db_leave( +static int SQLITE_TCLAPI db_leave( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -415,7 +415,7 @@ static int db_leave( ** ** Invoke the sqlite3_exec interface using the open database DB */ -static int test_exec( +static int SQLITE_TCLAPI test_exec( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -462,7 +462,7 @@ static int test_exec( ** Invoke the sqlite3_exec interface using the open database DB. Discard ** all results */ -static int test_exec_nr( +static int SQLITE_TCLAPI test_exec_nr( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -489,7 +489,7 @@ static int test_exec_nr( ** concatenate arg0 through argn using separator as the separator. ** Return the result. */ -static int test_mprintf_z( +static int SQLITE_TCLAPI test_mprintf_z( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -512,7 +512,7 @@ static int test_mprintf_z( ** Test the %n format of sqlite_mprintf(). Return the length of the ** input string. */ -static int test_mprintf_n( +static int SQLITE_TCLAPI test_mprintf_n( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -536,7 +536,7 @@ static int test_mprintf_n( ** You pass in a format string that requires more than one argument, ** bad things will happen. */ -static int test_snprintf_int( +static int SQLITE_TCLAPI test_snprintf_int( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -562,7 +562,7 @@ static int test_snprintf_int( ** DB. The SQL is the string FORMAT. The format string should contain ** one %s or %q. STRING is the value inserted into %s or %q. */ -static int test_get_table_printf( +static int SQLITE_TCLAPI test_get_table_printf( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -625,7 +625,7 @@ static int test_get_table_printf( ** ** Returns the integer ROWID of the most recent insert. */ -static int test_last_rowid( +static int SQLITE_TCLAPI test_last_rowid( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -649,7 +649,7 @@ static int test_last_rowid( ** ** Set the codec key. */ -static int test_key( +static int SQLITE_TCLAPI test_key( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -677,7 +677,7 @@ static int test_key( ** ** Change the codec key. */ -static int test_rekey( +static int SQLITE_TCLAPI test_rekey( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -705,7 +705,7 @@ static int test_rekey( ** ** Closes the database opened by sqlite3_open. */ -static int sqlite_test_close( +static int SQLITE_TCLAPI sqlite_test_close( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -729,7 +729,7 @@ static int sqlite_test_close( ** ** Closes the database opened by sqlite3_open. */ -static int sqlite_test_close_v2( +static int SQLITE_TCLAPI sqlite_test_close_v2( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1013,7 +1013,7 @@ static void nondeterministicFunction( ** sqlite3_create_function function while a query is in progress in order ** to test the SQLITE_MISUSE detection logic. */ -static int test_create_function( +static int SQLITE_TCLAPI test_create_function( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1170,7 +1170,7 @@ static void legacyCountFinalize(sqlite3_context *context){ ** "legacy_count()" with the supplied database handle. This is used ** to test the deprecated sqlite3_aggregate_count() API. */ -static int test_create_aggregate( +static int SQLITE_TCLAPI test_create_aggregate( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1211,7 +1211,7 @@ static int test_create_aggregate( ** Puts uses a separate buffer and debugging statements will be out of ** sequence if it is used. */ -static int test_printf( +static int SQLITE_TCLAPI test_printf( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1233,7 +1233,7 @@ static int test_printf( ** ** Call mprintf with three integer arguments */ -static int sqlite3_mprintf_int( +static int SQLITE_TCLAPI sqlite3_mprintf_int( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1260,7 +1260,7 @@ static int sqlite3_mprintf_int( ** ** Call mprintf with three 64-bit integer arguments */ -static int sqlite3_mprintf_int64( +static int SQLITE_TCLAPI sqlite3_mprintf_int64( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1293,7 +1293,7 @@ static int sqlite3_mprintf_int64( ** same as sqlite3_mprintf_int or sqlite3_mprintf_int64, depending on ** platform. */ -static int sqlite3_mprintf_long( +static int SQLITE_TCLAPI sqlite3_mprintf_long( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1324,7 +1324,7 @@ static int sqlite3_mprintf_long( ** ** Call mprintf with two integer arguments and one string argument */ -static int sqlite3_mprintf_str( +static int SQLITE_TCLAPI sqlite3_mprintf_str( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1351,7 +1351,7 @@ static int sqlite3_mprintf_str( ** ** Call mprintf with two integer arguments and one string argument */ -static int sqlite3_snprintf_str( +static int SQLITE_TCLAPI sqlite3_snprintf_str( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1385,7 +1385,7 @@ static int sqlite3_snprintf_str( ** ** Call mprintf with two integer arguments and one double argument */ -static int sqlite3_mprintf_double( +static int SQLITE_TCLAPI sqlite3_mprintf_double( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1416,7 +1416,7 @@ static int sqlite3_mprintf_double( ** two arguments given above. This is used to generate overflow and underflow ** doubles to test that they are converted properly. */ -static int sqlite3_mprintf_scaled( +static int SQLITE_TCLAPI sqlite3_mprintf_scaled( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1446,7 +1446,7 @@ static int sqlite3_mprintf_scaled( ** two arguments given above. This is used to generate overflow and underflow ** doubles to test that they are converted properly. */ -static int sqlite3_mprintf_stronly( +static int SQLITE_TCLAPI sqlite3_mprintf_stronly( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1470,7 +1470,7 @@ static int sqlite3_mprintf_stronly( ** Call mprintf with a single double argument which is derived from the ** hexadecimal encoding of an IEEE double. */ -static int sqlite3_mprintf_hexdouble( +static int SQLITE_TCLAPI sqlite3_mprintf_hexdouble( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -1503,7 +1503,7 @@ static int sqlite3_mprintf_hexdouble( ** */ #if !defined(SQLITE_OMIT_SHARED_CACHE) -static int test_enable_shared( +static int SQLITE_TCLAPI test_enable_shared( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1540,7 +1540,7 @@ static int test_enable_shared( ** Usage: sqlite3_extended_result_codes DB BOOLEAN ** */ -static int test_extended_result_codes( +static int SQLITE_TCLAPI test_extended_result_codes( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1563,7 +1563,7 @@ static int test_extended_result_codes( ** Usage: sqlite3_libversion_number ** */ -static int test_libversion_number( +static int SQLITE_TCLAPI test_libversion_number( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1577,7 +1577,7 @@ static int test_libversion_number( ** Usage: sqlite3_table_column_metadata DB dbname tblname colname ** */ -static int test_table_column_metadata( +static int SQLITE_TCLAPI test_table_column_metadata( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1628,7 +1628,7 @@ static int test_table_column_metadata( #ifndef SQLITE_OMIT_INCRBLOB -static int blobHandleFromObj( +static int SQLITE_TCLAPI blobHandleFromObj( Tcl_Interp *interp, Tcl_Obj *pObj, sqlite3_blob **ppBlob @@ -1657,7 +1657,7 @@ static int blobHandleFromObj( return TCL_OK; } -static int test_blob_reopen( +static int SQLITE_TCLAPI test_blob_reopen( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1733,7 +1733,7 @@ static int testCreateCollationCmp( return iRes; } -static int test_create_collation_v2( +static int SQLITE_TCLAPI test_create_collation_v2( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1808,7 +1808,7 @@ static void cf2Destroy(void *pUser){ if( p->pDestroy ) Tcl_DecrRefCount(p->pDestroy); sqlite3_free(p); } -static int test_create_function_v2( +static int SQLITE_TCLAPI test_create_function_v2( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The invoking TCL interpreter */ int objc, /* Number of arguments */ @@ -1896,7 +1896,7 @@ static int test_create_function_v2( /* ** Usage: sqlite3_load_extension DB-HANDLE FILE ?PROC? */ -static int test_load_extension( +static int SQLITE_TCLAPI test_load_extension( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1954,7 +1954,7 @@ static int test_load_extension( /* ** Usage: sqlite3_enable_load_extension DB-HANDLE ONOFF */ -static int test_enable_load( +static int SQLITE_TCLAPI test_enable_load( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -2000,7 +2000,7 @@ static int test_enable_load( ** This command is used to test the recoverability of a database in ** the event of a program crash. */ -static int sqlite_abort( +static int SQLITE_TCLAPI sqlite_abort( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -2059,7 +2059,7 @@ error_out: ** ** Register the test SQL function on the database DB under the name NAME. */ -static int test_register_func( +static int SQLITE_TCLAPI test_register_func( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -2088,7 +2088,7 @@ static int test_register_func( ** ** Finalize a statement handle. */ -static int test_finalize( +static int SQLITE_TCLAPI test_finalize( void * clientData, Tcl_Interp *interp, int objc, @@ -2120,7 +2120,7 @@ static int test_finalize( ** ** Get the value of a status counter from a statement. */ -static int test_stmt_status( +static int SQLITE_TCLAPI test_stmt_status( void * clientData, Tcl_Interp *interp, int objc, @@ -2165,7 +2165,7 @@ static int test_stmt_status( /* ** Usage: sqlite3_stmt_scanstatus STMT IDX */ -static int test_stmt_scanstatus( +static int SQLITE_TCLAPI test_stmt_scanstatus( void * clientData, Tcl_Interp *interp, int objc, @@ -2215,7 +2215,7 @@ static int test_stmt_scanstatus( /* ** Usage: sqlite3_stmt_scanstatus_reset STMT */ -static int test_stmt_scanstatus_reset( +static int SQLITE_TCLAPI test_stmt_scanstatus_reset( void * clientData, Tcl_Interp *interp, int objc, @@ -2238,7 +2238,7 @@ static int test_stmt_scanstatus_reset( ** ** Zero the SQLITE_CONFIG_SQLLOG configuration */ -static int test_config_sqllog( +static int SQLITE_TCLAPI test_config_sqllog( void * clientData, Tcl_Interp *interp, int objc, @@ -2258,7 +2258,7 @@ static int test_config_sqllog( ** ** Return the value returned by the default VFS's xCurrentTimeInt64 method. */ -static int vfsCurrentTimeInt64( +static int SQLITE_TCLAPI vfsCurrentTimeInt64( void * clientData, Tcl_Interp *interp, int objc, @@ -2279,7 +2279,7 @@ static int vfsCurrentTimeInt64( /* ** Usage: sqlite3_snapshot_get DB DBNAME */ -static int test_snapshot_get( +static int SQLITE_TCLAPI test_snapshot_get( void * clientData, Tcl_Interp *interp, int objc, @@ -2314,7 +2314,7 @@ static int test_snapshot_get( /* ** Usage: sqlite3_snapshot_open DB DBNAME SNAPSHOT */ -static int test_snapshot_open( +static int SQLITE_TCLAPI test_snapshot_open( void * clientData, Tcl_Interp *interp, int objc, @@ -2346,7 +2346,7 @@ static int test_snapshot_open( /* ** Usage: sqlite3_snapshot_free SNAPSHOT */ -static int test_snapshot_free( +static int SQLITE_TCLAPI test_snapshot_free( void * clientData, Tcl_Interp *interp, int objc, @@ -2367,7 +2367,7 @@ static int test_snapshot_free( /* ** Usage: sqlite3_snapshot_cmp SNAPSHOT1 SNAPSHOT2 */ -static int test_snapshot_cmp( +static int SQLITE_TCLAPI test_snapshot_cmp( void * clientData, Tcl_Interp *interp, int objc, @@ -2393,7 +2393,7 @@ static int test_snapshot_cmp( ** ** Return the next statment in sequence after STMT. */ -static int test_next_stmt( +static int SQLITE_TCLAPI test_next_stmt( void * clientData, Tcl_Interp *interp, int objc, @@ -2425,7 +2425,7 @@ static int test_next_stmt( ** Return true if STMT is a NULL pointer or a pointer to a statement ** that is guaranteed to leave the database unmodified. */ -static int test_stmt_readonly( +static int SQLITE_TCLAPI test_stmt_readonly( void * clientData, Tcl_Interp *interp, int objc, @@ -2452,7 +2452,7 @@ static int test_stmt_readonly( ** Return true if STMT is a non-NULL pointer to a statement ** that has been stepped but not to completion. */ -static int test_stmt_busy( +static int SQLITE_TCLAPI test_stmt_busy( void * clientData, Tcl_Interp *interp, int objc, @@ -2478,7 +2478,7 @@ static int test_stmt_busy( ** ** Return true if STMT uses a statement journal. */ -static int uses_stmt_journal( +static int SQLITE_TCLAPI uses_stmt_journal( void * clientData, Tcl_Interp *interp, int objc, @@ -2504,7 +2504,7 @@ static int uses_stmt_journal( ** ** Reset a statement handle. */ -static int test_reset( +static int SQLITE_TCLAPI test_reset( void * clientData, Tcl_Interp *interp, int objc, @@ -2539,7 +2539,7 @@ static int test_reset( ** ** Return TRUE if a recompilation of the statement is recommended. */ -static int test_expired( +static int SQLITE_TCLAPI test_expired( void * clientData, Tcl_Interp *interp, int objc, @@ -2563,7 +2563,7 @@ static int test_expired( ** ** Transfer all bindings from FROMSTMT over to TOSTMT */ -static int test_transfer_bind( +static int SQLITE_TCLAPI test_transfer_bind( void * clientData, Tcl_Interp *interp, int objc, @@ -2590,7 +2590,7 @@ static int test_transfer_bind( ** Return the number of changes made to the database by the last SQL ** execution. */ -static int test_changes( +static int SQLITE_TCLAPI test_changes( void * clientData, Tcl_Interp *interp, int objc, @@ -2625,7 +2625,7 @@ static int sqlite_static_bind_nbyte = 0; ** of the VALUE is made. If FLAGS=="blob10" then a VALUE is ignored ** an a 10-byte blob "abc\000xyz\000pq" is inserted. */ -static int test_bind( +static int SQLITE_TCLAPI test_bind( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -2747,7 +2747,7 @@ static int test_collate_func( Tcl_GetIntFromObj(i, Tcl_GetObjResult(i), &res); return res; } -static int test_collate( +static int SQLITE_TCLAPI test_collate( void * clientData, Tcl_Interp *interp, int objc, @@ -2821,7 +2821,7 @@ static int test_utf16bin_collate_func( if( res==0 ) res = nA - nB; return res; } -static int test_utf16bin_collate( +static int SQLITE_TCLAPI test_utf16bin_collate( void * clientData, Tcl_Interp *interp, int objc, @@ -2878,7 +2878,7 @@ static void test_collate_needed_cb( /* ** Usage: add_test_collate_needed DB */ -static int test_collate_needed( +static int SQLITE_TCLAPI test_collate_needed( void * clientData, Tcl_Interp *interp, int objc, @@ -2929,7 +2929,7 @@ static int alignmentCollFunc( } return rc; } -static int add_alignment_test_collations( +static int SQLITE_TCLAPI add_alignment_test_collations( void * clientData, Tcl_Interp *interp, int objc, @@ -3047,7 +3047,7 @@ static void test_function_utf16be( sqlite3ValueFree(pVal); } #endif /* SQLITE_OMIT_UTF16 */ -static int test_function( +static int SQLITE_TCLAPI test_function( void * clientData, Tcl_Interp *interp, int objc, @@ -3092,7 +3092,7 @@ bad_args: ** The result is a list of two elements, the string representation of the ** error code and the english language explanation. */ -static int test_errstr( +static int SQLITE_TCLAPI test_errstr( void * clientData, Tcl_Interp *interp, int objc, @@ -3125,7 +3125,7 @@ static int test_errstr( ** Then run testfixture in the debugger and wait for the breakpoint to ** fire. Then additional breakpoints can be set to trace down the bug. */ -static int test_breakpoint( +static int SQLITE_TCLAPI test_breakpoint( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -3141,7 +3141,7 @@ static int test_breakpoint( ** IDX is the index of a wildcard in the prepared statement. This command ** binds a N-byte zero-filled BLOB to the wildcard. */ -static int test_bind_zeroblob( +static int SQLITE_TCLAPI test_bind_zeroblob( void * clientData, Tcl_Interp *interp, int objc, @@ -3177,7 +3177,7 @@ static int test_bind_zeroblob( ** IDX is the index of a wildcard in the prepared statement. This command ** binds a N-byte zero-filled BLOB to the wildcard. */ -static int test_bind_zeroblob64( +static int SQLITE_TCLAPI test_bind_zeroblob64( void * clientData, Tcl_Interp *interp, int objc, @@ -3214,7 +3214,7 @@ static int test_bind_zeroblob64( ** N is the index of a wildcard in the prepared statement. This command ** binds a 32-bit integer VALUE to that wildcard. */ -static int test_bind_int( +static int SQLITE_TCLAPI test_bind_int( void * clientData, Tcl_Interp *interp, int objc, @@ -3254,7 +3254,7 @@ static int test_bind_int( ** with no arguments in order to release memory. Each call to this procedure ** overwrites the previous array. */ -static int test_intarray_addr( +static int SQLITE_TCLAPI test_intarray_addr( void * clientData, Tcl_Interp *interp, int objc, @@ -3288,7 +3288,7 @@ static int test_intarray_addr( ** with no arguments in order to release memory. Each call to this procedure ** overwrites the previous array. */ -static int test_int64array_addr( +static int SQLITE_TCLAPI test_int64array_addr( void * clientData, Tcl_Interp *interp, int objc, @@ -3324,7 +3324,7 @@ static int test_int64array_addr( ** with no arguments in order to release memory. Each call to this procedure ** overwrites the previous array. */ -static int test_doublearray_addr( +static int SQLITE_TCLAPI test_doublearray_addr( void * clientData, Tcl_Interp *interp, int objc, @@ -3358,7 +3358,7 @@ static int test_doublearray_addr( ** with no arguments in order to release memory. Each call to this procedure ** overwrites the previous array. */ -static int test_textarray_addr( +static int SQLITE_TCLAPI test_textarray_addr( void * clientData, Tcl_Interp *interp, int objc, @@ -3391,7 +3391,7 @@ static int test_textarray_addr( ** N is the index of a wildcard in the prepared statement. This command ** binds a 64-bit integer VALUE to that wildcard. */ -static int test_bind_int64( +static int SQLITE_TCLAPI test_bind_int64( void * clientData, Tcl_Interp *interp, int objc, @@ -3429,7 +3429,7 @@ static int test_bind_int64( ** N is the index of a wildcard in the prepared statement. This command ** binds a 64-bit integer VALUE to that wildcard. */ -static int test_bind_double( +static int SQLITE_TCLAPI test_bind_double( void * clientData, Tcl_Interp *interp, int objc, @@ -3505,7 +3505,7 @@ static int test_bind_double( ** N is the index of a wildcard in the prepared statement. This command ** binds a NULL to the wildcard. */ -static int test_bind_null( +static int SQLITE_TCLAPI test_bind_null( void * clientData, Tcl_Interp *interp, int objc, @@ -3541,7 +3541,7 @@ static int test_bind_null( ** binds a UTF-8 string STRING to the wildcard. The string is BYTES bytes ** long. */ -static int test_bind_text( +static int SQLITE_TCLAPI test_bind_text( void * clientData, Tcl_Interp *interp, int objc, @@ -3582,7 +3582,7 @@ static int test_bind_text( ** binds a UTF-16 string STRING to the wildcard. The string is BYTES bytes ** long. */ -static int test_bind_text16( +static int SQLITE_TCLAPI test_bind_text16( void * clientData, Tcl_Interp *interp, int objc, @@ -3630,7 +3630,7 @@ static int test_bind_text16( ** N is the index of a wildcard in the prepared statement. This command ** binds a BLOB to the wildcard. The BLOB is BYTES bytes in size. */ -static int test_bind_blob( +static int SQLITE_TCLAPI test_bind_blob( void * clientData, Tcl_Interp *interp, int objc, @@ -3682,7 +3682,7 @@ static int test_bind_blob( ** ** Return the number of wildcards in the given statement. */ -static int test_bind_parameter_count( +static int SQLITE_TCLAPI test_bind_parameter_count( void * clientData, Tcl_Interp *interp, int objc, @@ -3706,7 +3706,7 @@ static int test_bind_parameter_count( ** An empty string is returned if N is out of range or if the wildcard ** is nameless. */ -static int test_bind_parameter_name( +static int SQLITE_TCLAPI test_bind_parameter_name( void * clientData, Tcl_Interp *interp, int objc, @@ -3733,7 +3733,7 @@ static int test_bind_parameter_name( ** Return the index of the wildcard called NAME. Return 0 if there is ** no such wildcard. */ -static int test_bind_parameter_index( +static int SQLITE_TCLAPI test_bind_parameter_index( void * clientData, Tcl_Interp *interp, int objc, @@ -3758,7 +3758,7 @@ static int test_bind_parameter_index( ** Usage: sqlite3_clear_bindings STMT ** */ -static int test_clear_bindings( +static int SQLITE_TCLAPI test_clear_bindings( void * clientData, Tcl_Interp *interp, int objc, @@ -3778,7 +3778,7 @@ static int test_clear_bindings( /* ** Usage: sqlite3_sleep MILLISECONDS */ -static int test_sleep( +static int SQLITE_TCLAPI test_sleep( void * clientData, Tcl_Interp *interp, int objc, @@ -3803,7 +3803,7 @@ static int test_sleep( ** Return the string representation of the most recent sqlite3_* API ** error code. e.g. "SQLITE_ERROR". */ -static int test_ex_errcode( +static int SQLITE_TCLAPI test_ex_errcode( void * clientData, Tcl_Interp *interp, int objc, @@ -3830,7 +3830,7 @@ static int test_ex_errcode( ** Return the string representation of the most recent sqlite3_* API ** error code. e.g. "SQLITE_ERROR". */ -static int test_errcode( +static int SQLITE_TCLAPI test_errcode( void * clientData, Tcl_Interp *interp, int objc, @@ -3856,7 +3856,7 @@ static int test_errcode( ** Returns the UTF-8 representation of the error message string for the ** most recent sqlite3_* API call. */ -static int test_errmsg( +static int SQLITE_TCLAPI test_errmsg( void * clientData, Tcl_Interp *interp, int objc, @@ -3885,7 +3885,7 @@ static int test_errmsg( ** level, and it includes the 0x00 0x00 terminator bytes at the end of the ** UTF-16 string. */ -static int test_errmsg16( +static int SQLITE_TCLAPI test_errmsg16( void * clientData, Tcl_Interp *interp, int objc, @@ -3922,7 +3922,7 @@ static int test_errmsg16( ** variable that is set to the unused portion of (if any). A ** STMT handle is returned. */ -static int test_prepare( +static int SQLITE_TCLAPI test_prepare( void * clientData, Tcl_Interp *interp, int objc, @@ -3979,7 +3979,7 @@ static int test_prepare( ** variable that is set to the unused portion of (if any). A ** STMT handle is returned. */ -static int test_prepare_v2( +static int SQLITE_TCLAPI test_prepare_v2( void * clientData, Tcl_Interp *interp, int objc, @@ -4047,7 +4047,7 @@ static int test_prepare_v2( ** Generate a prepared statement for a zero-byte string as a test ** for ticket #3134. The string should be preceded by a zero byte. */ -static int test_prepare_tkt3134( +static int SQLITE_TCLAPI test_prepare_tkt3134( void * clientData, Tcl_Interp *interp, int objc, @@ -4090,7 +4090,7 @@ static int test_prepare_tkt3134( ** variable that is set to the unused portion of (if any). A ** STMT handle is returned. */ -static int test_prepare16( +static int SQLITE_TCLAPI test_prepare16( void * clientData, Tcl_Interp *interp, int objc, @@ -4150,7 +4150,7 @@ static int test_prepare16( ** variable that is set to the unused portion of (if any). A ** STMT handle is returned. */ -static int test_prepare16_v2( +static int SQLITE_TCLAPI test_prepare16_v2( void * clientData, Tcl_Interp *interp, int objc, @@ -4205,7 +4205,7 @@ static int test_prepare16_v2( /* ** Usage: sqlite3_open filename ?options-list? */ -static int test_open( +static int SQLITE_TCLAPI test_open( void * clientData, Tcl_Interp *interp, int objc, @@ -4232,7 +4232,7 @@ static int test_open( /* ** Usage: sqlite3_open_v2 FILENAME FLAGS VFS */ -static int test_open_v2( +static int SQLITE_TCLAPI test_open_v2( void * clientData, Tcl_Interp *interp, int objc, @@ -4302,7 +4302,7 @@ static int test_open_v2( /* ** Usage: sqlite3_open16 filename options */ -static int test_open16( +static int SQLITE_TCLAPI test_open16( void * clientData, Tcl_Interp *interp, int objc, @@ -4334,7 +4334,7 @@ static int test_open16( ** Return 1 if the supplied argument is a complete SQL statement, or zero ** otherwise. */ -static int test_complete16( +static int SQLITE_TCLAPI test_complete16( void * clientData, Tcl_Interp *interp, int objc, @@ -4359,7 +4359,7 @@ static int test_complete16( ** ** Advance the statement to the next row. */ -static int test_step( +static int SQLITE_TCLAPI test_step( void * clientData, Tcl_Interp *interp, int objc, @@ -4382,7 +4382,7 @@ static int test_step( return TCL_OK; } -static int test_sql( +static int SQLITE_TCLAPI test_sql( void * clientData, Tcl_Interp *interp, int objc, @@ -4399,7 +4399,7 @@ static int test_sql( Tcl_SetResult(interp, (char *)sqlite3_sql(pStmt), TCL_VOLATILE); return TCL_OK; } -static int test_ex_sql( +static int SQLITE_TCLAPI test_ex_sql( void * clientData, Tcl_Interp *interp, int objc, @@ -4425,7 +4425,7 @@ static int test_ex_sql( ** ** Return the number of columns returned by the sql statement STMT. */ -static int test_column_count( +static int SQLITE_TCLAPI test_column_count( void * clientData, Tcl_Interp *interp, int objc, @@ -4450,7 +4450,7 @@ static int test_column_count( ** ** Return the type of the data in column 'column' of the current row. */ -static int test_column_type( +static int SQLITE_TCLAPI test_column_type( void * clientData, Tcl_Interp *interp, int objc, @@ -4499,7 +4499,7 @@ static int test_column_type( ** Return the data in column 'column' of the current row cast as an ** wide (64-bit) integer. */ -static int test_column_int64( +static int SQLITE_TCLAPI test_column_int64( void * clientData, Tcl_Interp *interp, int objc, @@ -4526,7 +4526,7 @@ static int test_column_int64( /* ** Usage: sqlite3_column_blob STMT column */ -static int test_column_blob( +static int SQLITE_TCLAPI test_column_blob( void * clientData, Tcl_Interp *interp, int objc, @@ -4558,7 +4558,7 @@ static int test_column_blob( ** ** Return the data in column 'column' of the current row cast as a double. */ -static int test_column_double( +static int SQLITE_TCLAPI test_column_double( void * clientData, Tcl_Interp *interp, int objc, @@ -4587,7 +4587,7 @@ static int test_column_double( ** ** Return the number of columns returned by the sql statement STMT. */ -static int test_data_count( +static int SQLITE_TCLAPI test_data_count( void * clientData, Tcl_Interp *interp, int objc, @@ -4614,7 +4614,7 @@ static int test_data_count( ** ** Usage: sqlite3_column_name STMT column */ -static int test_stmt_utf8( +static int SQLITE_TCLAPI test_stmt_utf8( void * clientData, /* Pointer to SQLite API function to be invoke */ Tcl_Interp *interp, int objc, @@ -4641,7 +4641,7 @@ static int test_stmt_utf8( return TCL_OK; } -static int test_global_recover( +static int SQLITE_TCLAPI test_global_recover( void * clientData, Tcl_Interp *interp, int objc, @@ -4666,7 +4666,7 @@ static int test_global_recover( ** ** Usage: sqlite3_column_name STMT column */ -static int test_stmt_utf16( +static int SQLITE_TCLAPI test_stmt_utf16( void * clientData, /* Pointer to SQLite API function to be invoked */ Tcl_Interp *interp, int objc, @@ -4710,7 +4710,7 @@ static int test_stmt_utf16( ** Usage: sqlite3_column_bytes16 STMT column ** */ -static int test_stmt_int( +static int SQLITE_TCLAPI test_stmt_int( void * clientData, /* Pointer to SQLite API function to be invoked */ Tcl_Interp *interp, int objc, @@ -4739,7 +4739,7 @@ static int test_stmt_int( ** ** Set the db->magic value. This is used to test error recovery logic. */ -static int sqlite_set_magic( +static int SQLITE_TCLAPI sqlite_set_magic( void * clientData, Tcl_Interp *interp, int argc, @@ -4771,7 +4771,7 @@ static int sqlite_set_magic( ** ** Trigger an interrupt on DB */ -static int test_interrupt( +static int SQLITE_TCLAPI test_interrupt( void * clientData, Tcl_Interp *interp, int argc, @@ -4812,7 +4812,7 @@ u64 sqlite3StackDepth(void){ ** ** Try to measure the amount of stack space used by a call to sqlite3_exec */ -static int test_stack_used( +static int SQLITE_TCLAPI test_stack_used( void * clientData, Tcl_Interp *interp, int argc, @@ -4840,7 +4840,7 @@ static int test_stack_used( ** is assumed that the user function was created as UTF8, any number of ** arguments (the way the TCL interface does it). */ -static int delete_function( +static int SQLITE_TCLAPI delete_function( void * clientData, Tcl_Interp *interp, int argc, @@ -4866,7 +4866,7 @@ static int delete_function( ** DB. It is assumed that the collation sequence was created as UTF8 (the ** way the TCL interface does it). */ -static int delete_collation( +static int SQLITE_TCLAPI delete_collation( void * clientData, Tcl_Interp *interp, int argc, @@ -4891,7 +4891,7 @@ static int delete_collation( ** Return true if the database DB is currently in auto-commit mode. ** Return false if not. */ -static int get_autocommit( +static int SQLITE_TCLAPI get_autocommit( void * clientData, Tcl_Interp *interp, int argc, @@ -4917,7 +4917,7 @@ static int get_autocommit( ** method of the TCL interface. But we need a way to test the case ** where it returns SQLITE_MISUSE. */ -static int test_busy_timeout( +static int SQLITE_TCLAPI test_busy_timeout( void * clientData, Tcl_Interp *interp, int argc, @@ -4943,7 +4943,7 @@ static int test_busy_timeout( ** Return the name of the internal representation for the ** value of the given variable. */ -static int tcl_variable_type( +static int SQLITE_TCLAPI tcl_variable_type( void * clientData, Tcl_Interp *interp, int objc, @@ -4969,7 +4969,7 @@ static int tcl_variable_type( ** The integer N is the number of bytes we are trying to release. The ** return value is the amount of memory actually released. */ -static int test_release_memory( +static int SQLITE_TCLAPI test_release_memory( void * clientData, Tcl_Interp *interp, int objc, @@ -5000,7 +5000,7 @@ static int test_release_memory( ** Attempt to release memory currently held by database DB. Return the ** result code (which in the current implementation is always zero). */ -static int test_db_release_memory( +static int SQLITE_TCLAPI test_db_release_memory( void * clientData, Tcl_Interp *interp, int objc, @@ -5023,7 +5023,7 @@ static int test_db_release_memory( ** ** Attempt to flush any dirty pages to disk. */ -static int test_db_cacheflush( +static int SQLITE_TCLAPI test_db_cacheflush( void * clientData, Tcl_Interp *interp, int objc, @@ -5051,7 +5051,7 @@ static int test_db_cacheflush( ** ** Return the low-level system errno value. */ -static int test_system_errno( +static int SQLITE_TCLAPI test_system_errno( void * clientData, Tcl_Interp *interp, int objc, @@ -5074,7 +5074,7 @@ static int test_system_errno( ** ** Return the name of a file associated with a database. */ -static int test_db_filename( +static int SQLITE_TCLAPI test_db_filename( void * clientData, Tcl_Interp *interp, int objc, @@ -5098,7 +5098,7 @@ static int test_db_filename( ** Return 1 or 0 if DBNAME is readonly or not. Return -1 if DBNAME does ** not exist. */ -static int test_db_readonly( +static int SQLITE_TCLAPI test_db_readonly( void * clientData, Tcl_Interp *interp, int objc, @@ -5123,7 +5123,7 @@ static int test_db_readonly( ** limit is only changed if the N is present. The previous limit ** is returned. */ -static int test_soft_heap_limit( +static int SQLITE_TCLAPI test_soft_heap_limit( void * clientData, Tcl_Interp *interp, int objc, @@ -5148,7 +5148,7 @@ static int test_soft_heap_limit( ** ** Call the sqlite3_thread_cleanup API. */ -static int test_thread_cleanup( +static int SQLITE_TCLAPI test_thread_cleanup( void * clientData, Tcl_Interp *interp, int objc, @@ -5166,7 +5166,7 @@ static int test_thread_cleanup( ** Return a list of numbers which are the PagerRefcount for all ** pagers on each database connection. */ -static int test_pager_refcounts( +static int SQLITE_TCLAPI test_pager_refcounts( void * clientData, Tcl_Interp *interp, int objc, @@ -5212,7 +5212,7 @@ static int test_pager_refcounts( ** and that the errors they are seeing in the test scripts might be ** a result of their defective TCL rather than problems in SQLite. */ -static int working_64bit_int( +static int SQLITE_TCLAPI working_64bit_int( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5237,7 +5237,7 @@ static int working_64bit_int( ** VFS when none are previously registered, and the ability to ** unregister the only available VFS. Ticket #2738 */ -static int vfs_unlink_test( +static int SQLITE_TCLAPI vfs_unlink_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5339,7 +5339,7 @@ static int vfs_unlink_test( ** This TCL command attempts to vfs_find and vfs_register when the ** sqlite3_initialize() interface is failing. All calls should fail. */ -static int vfs_initfail_test( +static int SQLITE_TCLAPI vfs_initfail_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5367,7 +5367,7 @@ static int nVfs = 0; ** ** Unregister all VFSes. */ -static int vfs_unregister_all( +static int SQLITE_TCLAPI vfs_unregister_all( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5389,7 +5389,7 @@ static int vfs_unregister_all( ** care to put the linked list back together in the same order as it was ** in before vfs_unregister_all was invoked. */ -static int vfs_reregister_all( +static int SQLITE_TCLAPI vfs_reregister_all( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5409,7 +5409,7 @@ static int vfs_reregister_all( ** This TCL command runs the sqlite3_file_control interface and ** verifies correct operation of the same. */ -static int file_control_test( +static int SQLITE_TCLAPI file_control_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5444,7 +5444,7 @@ static int file_control_test( ** This TCL command runs the sqlite3_file_control interface and ** verifies correct operation of the SQLITE_LAST_ERRNO verb. */ -static int file_control_lasterrno_test( +static int SQLITE_TCLAPI file_control_lasterrno_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5482,7 +5482,7 @@ static int file_control_lasterrno_test( ** verifies correct operation of the SQLITE_GET_LOCKPROXYFILE and ** SQLITE_SET_LOCKPROXYFILE verbs. */ -static int file_control_chunksize_test( +static int SQLITE_TCLAPI file_control_chunksize_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5519,7 +5519,7 @@ static int file_control_chunksize_test( ** This TCL command runs the sqlite3_file_control interface ** with SQLITE_FCNTL_SIZE_HINT */ -static int file_control_sizehint_test( +static int SQLITE_TCLAPI file_control_sizehint_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5557,7 +5557,7 @@ static int file_control_sizehint_test( ** verifies correct operation of the SQLITE_GET_LOCKPROXYFILE and ** SQLITE_SET_LOCKPROXYFILE verbs. */ -static int file_control_lockproxy_test( +static int SQLITE_TCLAPI file_control_lockproxy_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5627,7 +5627,7 @@ static int file_control_lockproxy_test( ** This TCL command runs the sqlite3_file_control interface with ** the SQLITE_FCNTL_WIN32_AV_RETRY opcode. */ -static int file_control_win32_av_retry( +static int SQLITE_TCLAPI file_control_win32_av_retry( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5660,7 +5660,7 @@ static int file_control_win32_av_retry( ** This TCL command runs the sqlite3_file_control interface with ** the SQLITE_FCNTL_WIN32_SET_HANDLE opcode. */ -static int file_control_win32_set_handle( +static int SQLITE_TCLAPI file_control_win32_set_handle( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5696,7 +5696,7 @@ static int file_control_win32_set_handle( ** This TCL command runs the sqlite3_file_control interface with ** the SQLITE_FCNTL_PERSIST_WAL opcode. */ -static int file_control_persist_wal( +static int SQLITE_TCLAPI file_control_persist_wal( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5728,7 +5728,7 @@ static int file_control_persist_wal( ** This TCL command runs the sqlite3_file_control interface with ** the SQLITE_FCNTL_POWERSAFE_OVERWRITE opcode. */ -static int file_control_powersafe_overwrite( +static int SQLITE_TCLAPI file_control_powersafe_overwrite( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5760,7 +5760,7 @@ static int file_control_powersafe_overwrite( ** ** Return a string that describes the stack of VFSes. */ -static int file_control_vfsname( +static int SQLITE_TCLAPI file_control_vfsname( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5792,7 +5792,7 @@ static int file_control_vfsname( ** ** Return a string that is a temporary filename */ -static int file_control_tempfilename( +static int SQLITE_TCLAPI file_control_tempfilename( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5825,7 +5825,7 @@ static int file_control_tempfilename( ** ** Return a tcl list containing the names of all registered vfs's. */ -static int vfs_list( +static int SQLITE_TCLAPI vfs_list( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5850,7 +5850,7 @@ static int vfs_list( ** This TCL command runs the sqlite3_limit interface and ** verifies correct operation of the same. */ -static int test_limit( +static int SQLITE_TCLAPI test_limit( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5913,7 +5913,7 @@ static int test_limit( ** At the same time, verify that sqlite3_test_control works even when ** called with an out-of-range opcode. */ -static int save_prng_state( +static int SQLITE_TCLAPI save_prng_state( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5929,7 +5929,7 @@ static int save_prng_state( /* ** tclcmd: restore_prng_state */ -static int restore_prng_state( +static int SQLITE_TCLAPI restore_prng_state( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5941,7 +5941,7 @@ static int restore_prng_state( /* ** tclcmd: reset_prng_state */ -static int reset_prng_state( +static int SQLITE_TCLAPI reset_prng_state( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5957,7 +5957,7 @@ static int reset_prng_state( ** Indicate that database files might be corrupt. In other words, set the normal ** state of operation. */ -static int database_may_be_corrupt( +static int SQLITE_TCLAPI database_may_be_corrupt( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5972,7 +5972,7 @@ static int database_may_be_corrupt( ** Indicate that database files are always well-formed. This enables extra assert() ** statements that test conditions that are always true for well-formed databases. */ -static int database_never_corrupt( +static int SQLITE_TCLAPI database_never_corrupt( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -5985,7 +5985,7 @@ static int database_never_corrupt( /* ** tclcmd: pcache_stats */ -static int test_pcache_stats( +static int SQLITE_TCLAPI test_pcache_stats( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6027,7 +6027,7 @@ static void test_unlock_notify_cb(void **aArg, int nArg){ ** tclcmd: sqlite3_unlock_notify db */ #ifdef SQLITE_ENABLE_UNLOCK_NOTIFY -static int test_unlock_notify( +static int SQLITE_TCLAPI test_unlock_notify( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6053,7 +6053,7 @@ static int test_unlock_notify( /* ** tclcmd: sqlite3_wal_checkpoint db ?NAME? */ -static int test_wal_checkpoint( +static int SQLITE_TCLAPI test_wal_checkpoint( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6097,7 +6097,7 @@ static int test_wal_checkpoint( ** the number of frames in the log and the number of frames in the log ** that have been checkpointed. */ -static int test_wal_checkpoint_v2( +static int SQLITE_TCLAPI test_wal_checkpoint_v2( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6153,7 +6153,7 @@ static int test_wal_checkpoint_v2( /* ** tclcmd: sqlite3_wal_autocheckpoint db VALUE */ -static int test_wal_autocheckpoint( +static int SQLITE_TCLAPI test_wal_autocheckpoint( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6204,7 +6204,7 @@ static void xLogcallback(void *unused, int err, char *zMsg){ Tcl_EvalObjEx(logcallback.pInterp, pNew, TCL_EVAL_GLOBAL|TCL_EVAL_DIRECT); Tcl_DecrRefCount(pNew); } -static int test_sqlite3_log( +static int SQLITE_TCLAPI test_sqlite3_log( ClientData clientData, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6235,7 +6235,7 @@ static int test_sqlite3_log( ** Run a TCL command using its objProc interface. Throw an error if ** the command has no objProc interface. */ -static int runAsObjProc( +static int SQLITE_TCLAPI runAsObjProc( void * clientData, Tcl_Interp *interp, int objc, @@ -6298,7 +6298,7 @@ int printExplainQueryPlan(sqlite3_stmt *pStmt){ return sqlite3_finalize(pExplain); } -static int test_print_eqp( +static int SQLITE_TCLAPI test_print_eqp( void * clientData, Tcl_Interp *interp, int objc, @@ -6326,7 +6326,7 @@ static int test_print_eqp( /* ** sqlite3_test_control VERB ARGS... */ -static int test_test_control( +static int SQLITE_TCLAPI test_test_control( void * clientData, Tcl_Interp *interp, int objc, @@ -6405,7 +6405,7 @@ static int test_test_control( #include #include -static int test_getrusage( +static int SQLITE_TCLAPI test_getrusage( void * clientData, Tcl_Interp *interp, int objc, @@ -6479,7 +6479,7 @@ static void SQLITE_CDECL win32_file_locker(void *pAppData){ ** Get an exclusive manditory lock on file for DELAY2 milliseconds. ** Wait DELAY1 milliseconds before acquiring the lock. */ -static int win32_file_lock( +static int SQLITE_TCLAPI win32_file_lock( void * clientData, Tcl_Interp *interp, int objc, @@ -6543,7 +6543,7 @@ static int win32_file_lock( ** Returns non-zero if the specified path exists, whose fully qualified name ** may exceed 260 characters if it is prefixed with "\\?\". */ -static int win32_exists_path( +static int SQLITE_TCLAPI win32_exists_path( void *clientData, Tcl_Interp *interp, int objc, @@ -6565,7 +6565,7 @@ static int win32_exists_path( ** whose fully qualified name may exceed 248 characters if it is prefixed with ** "\\?\". */ -static int win32_find_file( +static int SQLITE_TCLAPI win32_find_file( void *clientData, Tcl_Interp *interp, int objc, @@ -6610,7 +6610,7 @@ static int win32_find_file( ** Deletes the specified file, whose fully qualified name may exceed 260 ** characters if it is prefixed with "\\?\". */ -static int win32_delete_file( +static int SQLITE_TCLAPI win32_delete_file( void *clientData, Tcl_Interp *interp, int objc, @@ -6634,7 +6634,7 @@ static int win32_delete_file( ** Creates the specified directory, whose fully qualified name may exceed 248 ** characters if it is prefixed with "\\?\". */ -static int win32_mkdir( +static int SQLITE_TCLAPI win32_mkdir( void *clientData, Tcl_Interp *interp, int objc, @@ -6658,7 +6658,7 @@ static int win32_mkdir( ** Removes the specified directory, whose fully qualified name may exceed 248 ** characters if it is prefixed with "\\?\". */ -static int win32_rmdir( +static int SQLITE_TCLAPI win32_rmdir( void *clientData, Tcl_Interp *interp, int objc, @@ -6685,7 +6685,7 @@ static int win32_rmdir( ** interface. Disable if BOOLEAN is false and enable if BOOLEAN is true. ** OPT is the name of the optimization to be disabled. */ -static int optimization_control( +static int SQLITE_TCLAPI optimization_control( void * clientData, Tcl_Interp *interp, int objc, @@ -6748,7 +6748,7 @@ typedef struct sqlite3_api_routines sqlite3_api_routines; ** ** Load one or more statically linked extensions. */ -static int tclLoadStaticExtensionCmd( +static int SQLITE_TCLAPI tclLoadStaticExtensionCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -6826,7 +6826,7 @@ static int tclLoadStaticExtensionCmd( ** sorter_test_fakeheap BOOL ** */ -static int sorter_test_fakeheap( +static int SQLITE_TCLAPI sorter_test_fakeheap( void * clientData, Tcl_Interp *interp, int objc, @@ -6866,7 +6866,7 @@ static int sorter_test_fakeheap( ** Then execute statement $SQL2. Check that the statement returns the same ** set of integers in the same order as in the previous step (using $SQL1). */ -static int sorter_test_sort4_helper( +static int SQLITE_TCLAPI sorter_test_sort4_helper( void * clientData, Tcl_Interp *interp, int objc, @@ -6935,7 +6935,7 @@ static int sorter_test_sort4_helper( /* ** tclcmd: sqlite3_user_authenticate DB USERNAME PASSWORD */ -static int test_user_authenticate( +static int SQLITE_TCLAPI test_user_authenticate( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6966,7 +6966,7 @@ static int test_user_authenticate( /* ** tclcmd: sqlite3_user_add DB USERNAME PASSWORD ISADMIN */ -static int test_user_add( +static int SQLITE_TCLAPI test_user_add( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -6999,7 +6999,7 @@ static int test_user_add( /* ** tclcmd: sqlite3_user_change DB USERNAME PASSWORD ISADMIN */ -static int test_user_change( +static int SQLITE_TCLAPI test_user_change( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -7032,7 +7032,7 @@ static int test_user_change( /* ** tclcmd: sqlite3_user_delete DB USERNAME */ -static int test_user_delete( +static int SQLITE_TCLAPI test_user_delete( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -7069,7 +7069,7 @@ static int test_user_delete( ** 3 Read after free ** 4 Panic */ -static int test_bad_behavior( +static int SQLITE_TCLAPI test_bad_behavior( ClientData clientData, /* Pointer to an integer containing zero */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -7119,7 +7119,7 @@ static int test_bad_behavior( ** ** Cause the dbstat virtual table to be available on the connection DB */ -static int test_register_dbstat_vtab( +static int SQLITE_TCLAPI test_register_dbstat_vtab( void *clientData, Tcl_Interp *interp, int objc, @@ -7153,7 +7153,7 @@ static int test_register_dbstat_vtab( ** ** Invoke sqlite3_db_config() for one of the setting values. */ -static int test_sqlite3_db_config( +static int SQLITE_TCLAPI test_sqlite3_db_config( void *clientData, Tcl_Interp *interp, int objc, @@ -7210,7 +7210,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ extern int sqlite3_hostid_num; #endif extern int sqlite3_max_blobsize; - extern int sqlite3BtreeSharedCacheReport(void*, + extern int SQLITE_TCLAPI sqlite3BtreeSharedCacheReport(void*, Tcl_Interp*,int,Tcl_Obj*CONST*); static int iZero = 0; static struct { diff --git a/src/test2.c b/src/test2.c index 8946196ff3..dfca1d2b31 100644 --- a/src/test2.c +++ b/src/test2.c @@ -42,7 +42,7 @@ static void pager_test_reiniter(DbPage *pNotUsed){ ** ** Open a new pager */ -static int pager_open( +static int SQLITE_TCLAPI pager_open( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -79,7 +79,7 @@ static int pager_open( ** ** Close the given pager. */ -static int pager_close( +static int SQLITE_TCLAPI pager_close( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -106,7 +106,7 @@ static int pager_close( ** ** Rollback changes */ -static int pager_rollback( +static int SQLITE_TCLAPI pager_rollback( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -133,7 +133,7 @@ static int pager_rollback( ** ** Commit all changes */ -static int pager_commit( +static int SQLITE_TCLAPI pager_commit( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -165,7 +165,7 @@ static int pager_commit( ** ** Start a new checkpoint. */ -static int pager_stmt_begin( +static int SQLITE_TCLAPI pager_stmt_begin( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -192,7 +192,7 @@ static int pager_stmt_begin( ** ** Rollback changes to a checkpoint */ -static int pager_stmt_rollback( +static int SQLITE_TCLAPI pager_stmt_rollback( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -220,7 +220,7 @@ static int pager_stmt_rollback( ** ** Commit changes to a checkpoint */ -static int pager_stmt_commit( +static int SQLITE_TCLAPI pager_stmt_commit( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -247,7 +247,7 @@ static int pager_stmt_commit( ** ** Return pager statistics. */ -static int pager_stats( +static int SQLITE_TCLAPI pager_stats( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -280,7 +280,7 @@ static int pager_stats( ** ** Return the size of the database file. */ -static int pager_pagecount( +static int SQLITE_TCLAPI pager_pagecount( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -306,7 +306,7 @@ static int pager_pagecount( ** ** Return a pointer to a page from the database. */ -static int page_get( +static int SQLITE_TCLAPI page_get( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -343,7 +343,7 @@ static int page_get( ** Return a pointer to a page if the page is already in cache. ** If not in cache, return an empty string. */ -static int page_lookup( +static int SQLITE_TCLAPI page_lookup( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -371,7 +371,7 @@ static int page_lookup( /* ** Usage: pager_truncate ID PGNO */ -static int pager_truncate( +static int SQLITE_TCLAPI pager_truncate( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -396,7 +396,7 @@ static int pager_truncate( ** ** Drop a pointer to a page. */ -static int page_unref( +static int SQLITE_TCLAPI page_unref( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -418,7 +418,7 @@ static int page_unref( ** ** Return the content of a page */ -static int page_read( +static int SQLITE_TCLAPI page_read( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -442,7 +442,7 @@ static int page_read( ** ** Return the page number for a page. */ -static int page_number( +static int SQLITE_TCLAPI page_number( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -466,7 +466,7 @@ static int page_number( ** ** Write something into a page. */ -static int page_write( +static int SQLITE_TCLAPI page_write( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -502,7 +502,7 @@ static int page_write( ** new pages after N. If N is 2096 or bigger, this will test the ** ability of SQLite to write to large files. */ -static int fake_big_file( +static int SQLITE_TCLAPI fake_big_file( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -555,7 +555,7 @@ static int fake_big_file( ** ** Set the PENDING_BYTE using the sqlite3_test_control() interface. */ -static int testPendingByte( +static int SQLITE_TCLAPI testPendingByte( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -620,7 +620,7 @@ static int faultSimCallback(int x){ ** appended, whenever sqlite3FaultSim() is called. Or, if SCRIPT is the ** empty string, cancel the sqlite3FaultSim() callback. */ -static int faultInstallCmd( +static int SQLITE_TCLAPI faultInstallCmd( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -663,7 +663,7 @@ static int faultInstallCmd( ** Invoke the SQLITE_TESTCTRL_BITVEC_TEST operator on test_control. ** See comments on sqlite3BitvecBuiltinTest() for additional information. */ -static int testBitvecBuiltinTest( +static int SQLITE_TCLAPI testBitvecBuiltinTest( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ diff --git a/src/test3.c b/src/test3.c index f1b9f37924..6995684c29 100644 --- a/src/test3.c +++ b/src/test3.c @@ -37,7 +37,7 @@ static int nRefSqlite3 = 0; ** ** Open a new database */ -static int btree_open( +static int SQLITE_TCLAPI btree_open( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -83,7 +83,7 @@ static int btree_open( ** ** Close the given database. */ -static int btree_close( +static int SQLITE_TCLAPI btree_close( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -118,7 +118,7 @@ static int btree_close( ** ** Start a new transaction */ -static int btree_begin_transaction( +static int SQLITE_TCLAPI btree_begin_transaction( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -147,7 +147,7 @@ static int btree_begin_transaction( ** ** Returns pager statistics */ -static int btree_pager_stats( +static int SQLITE_TCLAPI btree_pager_stats( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -197,7 +197,7 @@ static int btree_pager_stats( ** ** Create a new cursor. Return the ID for the cursor. */ -static int btree_cursor( +static int SQLITE_TCLAPI btree_cursor( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -246,7 +246,7 @@ static int btree_cursor( ** ** Close a cursor opened using btree_cursor. */ -static int btree_close_cursor( +static int SQLITE_TCLAPI btree_close_cursor( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -283,7 +283,7 @@ static int btree_close_cursor( ** or 1 if the cursor was already on the last entry in the table or if ** the table is empty. */ -static int btree_next( +static int SQLITE_TCLAPI btree_next( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -318,7 +318,7 @@ static int btree_next( ** Move the cursor to the first entry in the table. Return 0 if the ** cursor was left point to something and 1 if the table is empty. */ -static int btree_first( +static int SQLITE_TCLAPI btree_first( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -353,7 +353,7 @@ static int btree_first( ** Return TRUE if the given cursor is not pointing at a valid entry. ** Return FALSE if the cursor does point to a valid entry. */ -static int btree_eof( +static int SQLITE_TCLAPI btree_eof( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -382,7 +382,7 @@ static int btree_eof( ** ** Return the number of bytes of payload */ -static int btree_payload_size( +static int SQLITE_TCLAPI btree_payload_size( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -420,7 +420,7 @@ static int btree_payload_size( ** This command returns nothing if it works. It returns an error message ** if something goes wrong. */ -static int btree_varint_test( +static int SQLITE_TCLAPI btree_varint_test( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -504,7 +504,7 @@ static int btree_varint_test( ** sqlite3 db test.db ** set bt [btree_from_db db] */ -static int btree_from_db( +static int SQLITE_TCLAPI btree_from_db( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -544,7 +544,7 @@ static int btree_from_db( ** ** Return true if the B-Tree is currently stored entirely in memory. */ -static int btree_ismemdb( +static int SQLITE_TCLAPI btree_ismemdb( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -575,7 +575,7 @@ static int btree_ismemdb( ** ** Set the size of the cache used by btree $ID. */ -static int btree_set_cache_size( +static int SQLITE_TCLAPI btree_set_cache_size( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -605,7 +605,7 @@ static int btree_set_cache_size( ** ** Set the size of the cache used by btree $ID. */ -static int btree_insert( +static int SQLITE_TCLAPI btree_insert( ClientData clientData, Tcl_Interp *interp, int objc, diff --git a/src/test4.c b/src/test4.c index 85b521b060..c5b5ec12cc 100644 --- a/src/test4.c +++ b/src/test4.c @@ -125,7 +125,7 @@ static int parse_thread_id(Tcl_Interp *interp, const char *zArg){ ** NAME should be an upper case letter. Start the thread running with ** an open connection to the given database. */ -static int tcl_thread_create( +static int SQLITE_TCLAPI tcl_thread_create( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -174,7 +174,7 @@ static void thread_wait(Thread *p){ ** ** Wait on thread ID to reach its idle state. */ -static int tcl_thread_wait( +static int SQLITE_TCLAPI tcl_thread_wait( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -218,7 +218,7 @@ static void stop_thread(Thread *p){ ** Cause a thread to shut itself down. Wait for the shutdown to be ** completed. If ID is "*" then stop all threads. */ -static int tcl_thread_halt( +static int SQLITE_TCLAPI tcl_thread_halt( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -253,7 +253,7 @@ static int tcl_thread_halt( ** Wait on the most recent thread_step to complete, then return the ** number of columns in the result set. */ -static int tcl_thread_argc( +static int SQLITE_TCLAPI tcl_thread_argc( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -285,7 +285,7 @@ static int tcl_thread_argc( ** Wait on the most recent thread_step to complete, then return the ** value of the N-th columns in the result set. */ -static int tcl_thread_argv( +static int SQLITE_TCLAPI tcl_thread_argv( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -321,7 +321,7 @@ static int tcl_thread_argv( ** Wait on the most recent thread_step to complete, then return the ** name of the N-th columns in the result set. */ -static int tcl_thread_colname( +static int SQLITE_TCLAPI tcl_thread_colname( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -357,7 +357,7 @@ static int tcl_thread_colname( ** Wait on the most recent operation to complete, then return the ** result code from that operation. */ -static int tcl_thread_result( +static int SQLITE_TCLAPI tcl_thread_result( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -389,7 +389,7 @@ static int tcl_thread_result( ** Wait on the most recent operation to complete, then return the ** error string. */ -static int tcl_thread_error( +static int SQLITE_TCLAPI tcl_thread_error( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -434,7 +434,7 @@ static void do_compile(Thread *p){ ** ** Compile a new virtual machine. */ -static int tcl_thread_compile( +static int SQLITE_TCLAPI tcl_thread_compile( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -487,7 +487,7 @@ static void do_step(Thread *p){ ** ** Advance the virtual machine by one step */ -static int tcl_thread_step( +static int SQLITE_TCLAPI tcl_thread_step( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -529,7 +529,7 @@ static void do_finalize(Thread *p){ ** ** Finalize the virtual machine. */ -static int tcl_thread_finalize( +static int SQLITE_TCLAPI tcl_thread_finalize( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -560,7 +560,7 @@ static int tcl_thread_finalize( ** ** Interchange the sqlite* pointer between two threads. */ -static int tcl_thread_swap( +static int SQLITE_TCLAPI tcl_thread_swap( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -600,7 +600,7 @@ static int tcl_thread_swap( ** remove the pointer from the thread itself. Afterwards, the thread ** can be stopped and the connection can be used by the main thread. */ -static int tcl_thread_db_get( +static int SQLITE_TCLAPI tcl_thread_db_get( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -631,7 +631,7 @@ static int tcl_thread_db_get( ** Usage: thread_db_put ID DB ** */ -static int tcl_thread_db_put( +static int SQLITE_TCLAPI tcl_thread_db_put( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -663,7 +663,7 @@ static int tcl_thread_db_put( ** Return the database stmt pointer for the given thread. Then ** remove the pointer from the thread itself. */ -static int tcl_thread_stmt_get( +static int SQLITE_TCLAPI tcl_thread_stmt_get( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ diff --git a/src/test5.c b/src/test5.c index 2b49e408b6..0d9242862b 100644 --- a/src/test5.c +++ b/src/test5.c @@ -30,7 +30,7 @@ ** object with the encoded representation of the string, including ** the NULL terminator. */ -static int binarize( +static int SQLITE_TCLAPI binarize( void * clientData, Tcl_Interp *interp, int objc, @@ -58,7 +58,7 @@ static int binarize( ** If is 0, then the calls to sqlite3_value_text() are not ** actually made. */ -static int test_value_overhead( +static int SQLITE_TCLAPI test_value_overhead( void * clientData, Tcl_Interp *interp, int objc, @@ -122,7 +122,7 @@ static u8 name_to_enc(Tcl_Interp *interp, Tcl_Obj *pObj){ ** Usage: test_translate ?? ** */ -static int test_translate( +static int SQLITE_TCLAPI test_translate( void * clientData, Tcl_Interp *interp, int objc, @@ -186,7 +186,7 @@ static int test_translate( ** translation. If there is a problem an assert() will fail. **/ void sqlite3UtfSelfTest(void); -static int test_translate_selftest( +static int SQLITE_TCLAPI test_translate_selftest( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test6.c b/src/test6.c index e6eabf996a..5304bcc31f 100644 --- a/src/test6.c +++ b/src/test6.c @@ -811,7 +811,7 @@ static int processDevSymArgs( ** Simulate a crash immediately. This function does not return ** (writeListSync() calls exit(-1)). */ -static int crashNowCmd( +static int SQLITE_TCLAPI crashNowCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -832,7 +832,7 @@ static int crashNowCmd( ** Parameter ENABLE must be a boolean value. If true, then the "crash" ** vfs is added to the system. If false, it is removed. */ -static int crashEnableCmd( +static int SQLITE_TCLAPI crashEnableCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -907,7 +907,7 @@ static int crashEnableCmd( ** sqlite_crashparams -sect 1024 -char {atomic sequential} ./test.db 1 ** */ -static int crashParamsObjCmd( +static int SQLITE_TCLAPI crashParamsObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -954,7 +954,7 @@ error: return TCL_ERROR; } -static int devSymObjCmd( +static int SQLITE_TCLAPI devSymObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -977,7 +977,7 @@ static int devSymObjCmd( /* ** tclcmd: unregister_devsim */ -static int dsUnregisterObjCmd( +static int SQLITE_TCLAPI dsUnregisterObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -997,7 +997,7 @@ static int dsUnregisterObjCmd( /* ** tclcmd: register_jt_vfs ?-default? PARENT-VFS */ -static int jtObjCmd( +static int SQLITE_TCLAPI jtObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -1035,7 +1035,7 @@ static int jtObjCmd( /* ** tclcmd: unregister_jt_vfs */ -static int jtUnregisterObjCmd( +static int SQLITE_TCLAPI jtUnregisterObjCmd( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test7.c b/src/test7.c index d3b789e967..d57e4b826b 100644 --- a/src/test7.c +++ b/src/test7.c @@ -153,7 +153,7 @@ static int parse_client_id(Tcl_Interp *interp, const char *zArg){ ** NAME should be an upper case letter. Start the thread running with ** an open connection to the given database. */ -static int tcl_client_create( +static int SQLITE_TCLAPI tcl_client_create( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -206,7 +206,7 @@ static void client_wait(Thread *p){ ** ** Wait on thread ID to reach its idle state. */ -static int tcl_client_wait( +static int SQLITE_TCLAPI tcl_client_wait( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -250,7 +250,7 @@ static void stop_thread(Thread *p){ ** Cause a client thread to shut itself down. Wait for the shutdown to be ** completed. If ID is "*" then stop all client threads. */ -static int tcl_client_halt( +static int SQLITE_TCLAPI tcl_client_halt( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -298,7 +298,7 @@ static int tcl_client_halt( ** Wait on the most recent client_step to complete, then return the ** number of columns in the result set. */ -static int tcl_client_argc( +static int SQLITE_TCLAPI tcl_client_argc( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -330,7 +330,7 @@ static int tcl_client_argc( ** Wait on the most recent client_step to complete, then return the ** value of the N-th columns in the result set. */ -static int tcl_client_argv( +static int SQLITE_TCLAPI tcl_client_argv( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -366,7 +366,7 @@ static int tcl_client_argv( ** Wait on the most recent client_step to complete, then return the ** name of the N-th columns in the result set. */ -static int tcl_client_colname( +static int SQLITE_TCLAPI tcl_client_colname( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -404,7 +404,7 @@ extern const char *sqlite3ErrName(int); ** Wait on the most recent operation to complete, then return the ** result code from that operation. */ -static int tcl_client_result( +static int SQLITE_TCLAPI tcl_client_result( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -436,7 +436,7 @@ static int tcl_client_result( ** Wait on the most recent operation to complete, then return the ** error string. */ -static int tcl_client_error( +static int SQLITE_TCLAPI tcl_client_error( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -481,7 +481,7 @@ static void do_compile(Thread *p){ ** ** Compile a new virtual machine. */ -static int tcl_client_compile( +static int SQLITE_TCLAPI tcl_client_compile( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -534,7 +534,7 @@ static void do_step(Thread *p){ ** ** Advance the virtual machine by one step */ -static int tcl_client_step( +static int SQLITE_TCLAPI tcl_client_step( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -576,7 +576,7 @@ static void do_finalize(Thread *p){ ** ** Finalize the virtual machine. */ -static int tcl_client_finalize( +static int SQLITE_TCLAPI tcl_client_finalize( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -620,7 +620,7 @@ static void do_reset(Thread *p){ ** ** Finalize the virtual machine. */ -static int tcl_client_reset( +static int SQLITE_TCLAPI tcl_client_reset( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ @@ -651,7 +651,7 @@ static int tcl_client_reset( ** ** Interchange the sqlite* pointer between two threads. */ -static int tcl_client_swap( +static int SQLITE_TCLAPI tcl_client_swap( void *NotUsed, Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int argc, /* Number of arguments */ diff --git a/src/test8.c b/src/test8.c index e635d5ed2c..daab504e4e 100644 --- a/src/test8.c +++ b/src/test8.c @@ -1357,7 +1357,7 @@ static void moduleDestroy(void *p){ /* ** Register the echo virtual table module. */ -static int register_echo_module( +static int SQLITE_TCLAPI register_echo_module( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -1397,7 +1397,7 @@ static int register_echo_module( ** ** sqlite3_declare_vtab DB SQL */ -static int declare_vtab( +static int SQLITE_TCLAPI declare_vtab( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test9.c b/src/test9.c index 3c3629c0a7..5b139e8a56 100644 --- a/src/test9.c +++ b/src/test9.c @@ -26,7 +26,7 @@ /* ** c_collation_test */ -static int c_collation_test( +static int SQLITE_TCLAPI c_collation_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -67,7 +67,7 @@ error_out: /* ** c_realloc_test */ -static int c_realloc_test( +static int SQLITE_TCLAPI c_realloc_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -108,7 +108,7 @@ error_out: /* ** c_misuse_test */ -static int c_misuse_test( +static int SQLITE_TCLAPI c_misuse_test( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_async.c b/src/test_async.c index 8389e75dbd..c32c74c660 100644 --- a/src/test_async.c +++ b/src/test_async.c @@ -19,6 +19,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #ifdef SQLITE_ENABLE_ASYNCIO @@ -40,7 +43,7 @@ TCL_DECLARE_MUTEX(testasync_g_writerMutex); /* ** sqlite3async_initialize PARENT-VFS ISDEFAULT */ -static int testAsyncInit( +static int SQLITE_TCLAPI testAsyncInit( void * clientData, Tcl_Interp *interp, int objc, @@ -73,7 +76,7 @@ static int testAsyncInit( /* ** sqlite3async_shutdown */ -static int testAsyncShutdown( +static int SQLITE_TCLAPI testAsyncShutdown( void * clientData, Tcl_Interp *interp, int objc, @@ -97,7 +100,7 @@ static Tcl_ThreadCreateType tclWriterThread(ClientData pIsStarted){ ** ** Start a new writer thread. */ -static int testAsyncStart( +static int SQLITE_TCLAPI testAsyncStart( void * clientData, Tcl_Interp *interp, int objc, @@ -129,7 +132,7 @@ static int testAsyncStart( ** If the current writer thread is set to run forever then this ** command would block forever. To prevent that, an error is returned. */ -static int testAsyncWait( +static int SQLITE_TCLAPI testAsyncWait( void * clientData, Tcl_Interp *interp, int objc, @@ -155,7 +158,7 @@ static int testAsyncWait( /* ** sqlite3async_control OPTION ?VALUE? */ -static int testAsyncControl( +static int SQLITE_TCLAPI testAsyncControl( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_autoext.c b/src/test_autoext.c index b536cd7321..94a3223e65 100644 --- a/src/test_autoext.c +++ b/src/test_autoext.c @@ -15,6 +15,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #include "sqlite3ext.h" @@ -91,7 +94,7 @@ static int broken_init( ** ** Register the "sqr" extension to be loaded automatically. */ -static int autoExtSqrObjCmd( +static int SQLITE_TCLAPI autoExtSqrObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -107,7 +110,7 @@ static int autoExtSqrObjCmd( ** ** Unregister the "sqr" extension. */ -static int cancelAutoExtSqrObjCmd( +static int SQLITE_TCLAPI cancelAutoExtSqrObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -123,7 +126,7 @@ static int cancelAutoExtSqrObjCmd( ** ** Register the "cube" extension to be loaded automatically. */ -static int autoExtCubeObjCmd( +static int SQLITE_TCLAPI autoExtCubeObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -139,7 +142,7 @@ static int autoExtCubeObjCmd( ** ** Unregister the "cube" extension. */ -static int cancelAutoExtCubeObjCmd( +static int SQLITE_TCLAPI cancelAutoExtCubeObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -155,7 +158,7 @@ static int cancelAutoExtCubeObjCmd( ** ** Register the broken extension to be loaded automatically. */ -static int autoExtBrokenObjCmd( +static int SQLITE_TCLAPI autoExtBrokenObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -171,7 +174,7 @@ static int autoExtBrokenObjCmd( ** ** Unregister the broken extension. */ -static int cancelAutoExtBrokenObjCmd( +static int SQLITE_TCLAPI cancelAutoExtBrokenObjCmd( void * clientData, Tcl_Interp *interp, int objc, @@ -190,7 +193,7 @@ static int cancelAutoExtBrokenObjCmd( ** ** Reset all auto-extensions */ -static int resetAutoExtObjCmd( +static int SQLITE_TCLAPI resetAutoExtObjCmd( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_backup.c b/src/test_backup.c index 3e91f1f219..9b684a28f6 100644 --- a/src/test_backup.c +++ b/src/test_backup.c @@ -17,6 +17,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #include "sqlite3.h" #include @@ -27,7 +30,7 @@ extern const char *sqlite3ErrName(int); /* These functions are implemented in test1.c. */ extern int getDbPointer(Tcl_Interp *, const char *, sqlite3 **); -static int backupTestCmd( +static int SQLITE_TCLAPI backupTestCmd( ClientData clientData, Tcl_Interp *interp, int objc, @@ -102,7 +105,7 @@ static int backupTestCmd( return TCL_OK; } -static void backupTestFinish(ClientData clientData){ +static void SQLITE_TCLAPI backupTestFinish(ClientData clientData){ sqlite3_backup *pBackup = (sqlite3_backup *)clientData; sqlite3_backup_finish(pBackup); } @@ -111,7 +114,7 @@ static void backupTestFinish(ClientData clientData){ ** sqlite3_backup CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME ** */ -static int backupTestInit( +static int SQLITE_TCLAPI backupTestInit( ClientData clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_bestindex.c b/src/test_bestindex.c index 8e0ff00b52..94017f0349 100644 --- a/src/test_bestindex.c +++ b/src/test_bestindex.c @@ -567,7 +567,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb); /* ** Register the echo virtual table module. */ -static int register_tcl_module( +static int SQLITE_TCLAPI register_tcl_module( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_blob.c b/src/test_blob.c index 703664190b..3ac6c11421 100644 --- a/src/test_blob.c +++ b/src/test_blob.c @@ -99,7 +99,7 @@ static char *blobStringFromObj(Tcl_Obj *pObj){ ** ** Tcl test harness for the sqlite3_blob_open() function. */ -static int test_blob_open( +static int SQLITE_TCLAPI test_blob_open( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* Calling TCL interpreter */ int objc, /* Number of arguments */ @@ -150,7 +150,7 @@ static int test_blob_open( /* ** sqlite3_blob_close HANDLE */ -static int test_blob_close( +static int SQLITE_TCLAPI test_blob_close( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -178,7 +178,7 @@ static int test_blob_close( /* ** sqlite3_blob_bytes HANDLE */ -static int test_blob_bytes( +static int SQLITE_TCLAPI test_blob_bytes( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -214,7 +214,7 @@ static int test_blob_bytes( ** text representation of the returned error code (i.e. "SQLITE_NOMEM") ** and a Tcl exception is thrown. */ -static int test_blob_read( +static int SQLITE_TCLAPI test_blob_read( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -266,7 +266,7 @@ static int test_blob_read( ** result is set to the text representation of the returned error code ** (i.e. "SQLITE_NOMEM") and a Tcl exception is thrown. */ -static int test_blob_write( +static int SQLITE_TCLAPI test_blob_write( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_btree.c b/src/test_btree.c index 46860afb30..03b8b207c9 100644 --- a/src/test_btree.c +++ b/src/test_btree.c @@ -26,7 +26,7 @@ ** Return a list of file that are shared and the number of ** references to each file. */ -int sqlite3BtreeSharedCacheReport( +int SQLITE_TCLAPI sqlite3BtreeSharedCacheReport( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_demovfs.c b/src/test_demovfs.c index 9cc0eb0309..ba7af863cd 100644 --- a/src/test_demovfs.c +++ b/src/test_demovfs.c @@ -645,10 +645,13 @@ sqlite3_vfs *sqlite3_demovfs(void){ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #if SQLITE_OS_UNIX -static int register_demovfs( +static int SQLITE_TCLAPI register_demovfs( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -657,7 +660,7 @@ static int register_demovfs( sqlite3_vfs_register(sqlite3_demovfs(), 1); return TCL_OK; } -static int unregister_demovfs( +static int SQLITE_TCLAPI unregister_demovfs( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_fs.c b/src/test_fs.c index 329594a5ab..87088bdae7 100644 --- a/src/test_fs.c +++ b/src/test_fs.c @@ -875,7 +875,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb); /* ** Register the echo virtual table module. */ -static int register_fs_module( +static int SQLITE_TCLAPI register_fs_module( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_func.c b/src/test_func.c index 08ea98fb7a..6a714ef3eb 100644 --- a/src/test_func.c +++ b/src/test_func.c @@ -693,7 +693,7 @@ static int registerTestFunctions(sqlite3 *db){ ** the standard set of test functions to be loaded into each new ** database connection. */ -static int autoinstall_test_funcs( +static int SQLITE_TCLAPI autoinstall_test_funcs( void * clientData, Tcl_Interp *interp, int objc, @@ -721,7 +721,7 @@ static void tFinal(sqlite3_context *a){} ** Make various calls to sqlite3_create_function that do not have valid ** parameters. Verify that the error condition is detected and reported. */ -static int abuse_create_function( +static int SQLITE_TCLAPI abuse_create_function( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_hexio.c b/src/test_hexio.c index 88f5ed7bfa..7b62ea08bc 100644 --- a/src/test_hexio.c +++ b/src/test_hexio.c @@ -98,7 +98,7 @@ int sqlite3TestHexToBin(const unsigned char *zIn, int N, unsigned char *aOut){ ** beginning of the file. Convert that information to hexadecimal ** and return the resulting HEX string. */ -static int hexio_read( +static int SQLITE_TCLAPI hexio_read( void * clientData, Tcl_Interp *interp, int objc, @@ -148,7 +148,7 @@ static int hexio_read( ** Write DATA into file FILENAME beginning at OFFSET from the ** beginning of the file. DATA is expressed in hexadecimal. */ -static int hexio_write( +static int SQLITE_TCLAPI hexio_write( void * clientData, Tcl_Interp *interp, int objc, @@ -196,7 +196,7 @@ static int hexio_write( ** the value of that integer. HEXDATA can contain between 2 and 8 ** hexadecimal digits. */ -static int hexio_get_int( +static int SQLITE_TCLAPI hexio_get_int( void * clientData, Tcl_Interp *interp, int objc, @@ -236,7 +236,7 @@ static int hexio_get_int( ** ** Render INTEGER has a 16-bit big-endian integer in hexadecimal. */ -static int hexio_render_int16( +static int SQLITE_TCLAPI hexio_render_int16( void * clientData, Tcl_Interp *interp, int objc, @@ -263,7 +263,7 @@ static int hexio_render_int16( ** ** Render INTEGER has a 32-bit big-endian integer in hexadecimal. */ -static int hexio_render_int32( +static int SQLITE_TCLAPI hexio_render_int32( void * clientData, Tcl_Interp *interp, int objc, @@ -293,7 +293,7 @@ static int hexio_render_int32( ** The UTF8 might not be well-formed. Run this string through ** sqlite3Utf8to8() convert it back to hex and return the result. */ -static int utf8_to_utf8( +static int SQLITE_TCLAPI utf8_to_utf8( void * clientData, Tcl_Interp *interp, int objc, @@ -344,7 +344,7 @@ static int getFts3Varint(const char *p, sqlite_int64 *v){ ** Read a varint from the start of BLOB. Set variable VARNAME to contain ** the interpreted value. Return the number of bytes of BLOB consumed. */ -static int read_fts3varint( +static int SQLITE_TCLAPI read_fts3varint( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_init.c b/src/test_init.c index c66b5785d0..58465785d8 100644 --- a/src/test_init.c +++ b/src/test_init.c @@ -188,7 +188,7 @@ static void installInitWrappers(void){ sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcachemethods); } -static int init_wrapper_install( +static int SQLITE_TCLAPI init_wrapper_install( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -212,7 +212,7 @@ static int init_wrapper_install( return TCL_OK; } -static int init_wrapper_uninstall( +static int SQLITE_TCLAPI init_wrapper_uninstall( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -230,7 +230,7 @@ static int init_wrapper_uninstall( return TCL_OK; } -static int init_wrapper_clear( +static int SQLITE_TCLAPI init_wrapper_clear( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -247,7 +247,7 @@ static int init_wrapper_clear( return TCL_OK; } -static int init_wrapper_query( +static int SQLITE_TCLAPI init_wrapper_query( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_intarray.c b/src/test_intarray.c index c27b4597c0..ddfb13fe20 100644 --- a/src/test_intarray.c +++ b/src/test_intarray.c @@ -274,6 +274,9 @@ SQLITE_API int sqlite3_intarray_bind( # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif /* @@ -290,7 +293,7 @@ extern const char *sqlite3ErrName(int); ** Invoke the sqlite3_intarray_create interface. A string that becomes ** the first parameter to sqlite3_intarray_bind. */ -static int test_intarray_create( +static int SQLITE_TCLAPI test_intarray_create( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ @@ -326,7 +329,7 @@ static int test_intarray_create( ** ** Invoke the sqlite3_intarray_bind interface on the given array of integers. */ -static int test_intarray_bind( +static int SQLITE_TCLAPI test_intarray_bind( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_malloc.c b/src/test_malloc.c index 66d8a881ba..e8c248f958 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -310,7 +310,7 @@ static int textToPointer(const char *z, void **pp){ ** ** Raw test interface for sqlite3_malloc(). */ -static int test_malloc( +static int SQLITE_TCLAPI test_malloc( void * clientData, Tcl_Interp *interp, int objc, @@ -335,7 +335,7 @@ static int test_malloc( ** ** Raw test interface for sqlite3_realloc(). */ -static int test_realloc( +static int SQLITE_TCLAPI test_realloc( void * clientData, Tcl_Interp *interp, int objc, @@ -364,7 +364,7 @@ static int test_realloc( ** ** Raw test interface for sqlite3_free(). */ -static int test_free( +static int SQLITE_TCLAPI test_free( void * clientData, Tcl_Interp *interp, int objc, @@ -395,7 +395,7 @@ int sqlite3TestBinToHex(char*,int); ** Set a chunk of memory (obtained from malloc, probably) to a ** specified hex pattern. */ -static int test_memset( +static int SQLITE_TCLAPI test_memset( void * clientData, Tcl_Interp *interp, int objc, @@ -441,7 +441,7 @@ static int test_memset( ** ** Return memory as hexadecimal text. */ -static int test_memget( +static int SQLITE_TCLAPI test_memget( void * clientData, Tcl_Interp *interp, int objc, @@ -488,7 +488,7 @@ static int test_memget( ** ** Raw test interface for sqlite3_memory_used(). */ -static int test_memory_used( +static int SQLITE_TCLAPI test_memory_used( void * clientData, Tcl_Interp *interp, int objc, @@ -503,7 +503,7 @@ static int test_memory_used( ** ** Raw test interface for sqlite3_memory_highwater(). */ -static int test_memory_highwater( +static int SQLITE_TCLAPI test_memory_highwater( void * clientData, Tcl_Interp *interp, int objc, @@ -528,7 +528,7 @@ static int test_memory_highwater( ** Set the depth of backtracing. If SQLITE_MEMDEBUG is not defined ** then this routine is a no-op. */ -static int test_memdebug_backtrace( +static int SQLITE_TCLAPI test_memdebug_backtrace( void * clientData, Tcl_Interp *interp, int objc, @@ -554,7 +554,7 @@ static int test_memdebug_backtrace( ** ** Write a summary of unfreed memory to FILENAME. */ -static int test_memdebug_dump( +static int SQLITE_TCLAPI test_memdebug_dump( void * clientData, Tcl_Interp *interp, int objc, @@ -579,7 +579,7 @@ static int test_memdebug_dump( ** ** Return the total number of times malloc() has been called. */ -static int test_memdebug_malloc_count( +static int SQLITE_TCLAPI test_memdebug_malloc_count( void * clientData, Tcl_Interp *interp, int objc, @@ -619,7 +619,7 @@ static int test_memdebug_malloc_count( ** ** To disable simulated failures, use a COUNTER of -1. */ -static int test_memdebug_fail( +static int SQLITE_TCLAPI test_memdebug_fail( void * clientData, Tcl_Interp *interp, int objc, @@ -685,7 +685,7 @@ static int test_memdebug_fail( ** simulated failure occurs. A negative return value indicates that ** no malloc() failure is scheduled. */ -static int test_memdebug_pending( +static int SQLITE_TCLAPI test_memdebug_pending( void * clientData, Tcl_Interp *interp, int objc, @@ -718,7 +718,7 @@ static int sqlite3_memdebug_title_count = 0; ** ** Each title overwrite the previous. */ -static int test_memdebug_settitle( +static int SQLITE_TCLAPI test_memdebug_settitle( void * clientData, Tcl_Interp *interp, int objc, @@ -799,7 +799,7 @@ static void test_memdebug_log_clear(void){ Tcl_InitHashTable(&aMallocLog, MALLOC_LOG_KEYINTS); } -static int test_memdebug_log( +static int SQLITE_TCLAPI test_memdebug_log( void * clientData, Tcl_Interp *interp, int objc, @@ -897,7 +897,7 @@ static int test_memdebug_log( ** ** A negative SIZE causes the buffer pointer to be NULL. */ -static int test_config_scratch( +static int SQLITE_TCLAPI test_config_scratch( void * clientData, Tcl_Interp *interp, int objc, @@ -937,7 +937,7 @@ static int test_config_scratch( ** ** A negative SIZE causes the buffer pointer to be NULL. */ -static int test_config_pagecache( +static int SQLITE_TCLAPI test_config_pagecache( void * clientData, Tcl_Interp *interp, int objc, @@ -980,7 +980,7 @@ static int test_config_pagecache( ** is certainty. 0 is never. PRNG_SEED is the pseudo-random number generator ** seed. */ -static int test_alt_pcache( +static int SQLITE_TCLAPI test_alt_pcache( void * clientData, Tcl_Interp *interp, int objc, @@ -1021,7 +1021,7 @@ static int test_alt_pcache( ** ** Enable or disable memory status reporting using SQLITE_CONFIG_MEMSTATUS. */ -static int test_config_memstatus( +static int SQLITE_TCLAPI test_config_memstatus( void * clientData, Tcl_Interp *interp, int objc, @@ -1042,7 +1042,7 @@ static int test_config_memstatus( ** Usage: sqlite3_config_lookaside SIZE COUNT ** */ -static int test_config_lookaside( +static int SQLITE_TCLAPI test_config_lookaside( void * clientData, Tcl_Interp *interp, int objc, @@ -1076,7 +1076,7 @@ static int test_config_lookaside( ** is 10KB in size. A BUFID of 0 indicates that the buffer should be NULL ** which will cause sqlite3_db_config() to allocate space on its own. */ -static int test_db_config_lookaside( +static int SQLITE_TCLAPI test_db_config_lookaside( void * clientData, Tcl_Interp *interp, int objc, @@ -1111,7 +1111,7 @@ static int test_db_config_lookaside( /* ** Usage: sqlite3_config_heap NBYTE NMINALLOC */ -static int test_config_heap( +static int SQLITE_TCLAPI test_config_heap( void * clientData, Tcl_Interp *interp, int objc, @@ -1148,7 +1148,7 @@ static int test_config_heap( /* ** Usage: sqlite3_config_heap_size NBYTE */ -static int test_config_heap_size( +static int SQLITE_TCLAPI test_config_heap_size( void * clientData, Tcl_Interp *interp, int objc, @@ -1178,7 +1178,7 @@ static int test_config_heap_size( ** Invoke sqlite3_config() or sqlite3_db_config() with invalid ** opcodes and verify that they return errors. */ -static int test_config_error( +static int SQLITE_TCLAPI test_config_error( void * clientData, Tcl_Interp *interp, int objc, @@ -1216,7 +1216,7 @@ static int test_config_error( ** Enables or disables interpretation of URI parameters by default using ** SQLITE_CONFIG_URI. */ -static int test_config_uri( +static int SQLITE_TCLAPI test_config_uri( void * clientData, Tcl_Interp *interp, int objc, @@ -1245,7 +1245,7 @@ static int test_config_uri( ** Enables or disables the use of the covering-index scan optimization. ** SQLITE_CONFIG_COVERING_INDEX_SCAN. */ -static int test_config_cis( +static int SQLITE_TCLAPI test_config_cis( void * clientData, Tcl_Interp *interp, int objc, @@ -1273,7 +1273,7 @@ static int test_config_cis( ** ** Set the minimum PMA size. */ -static int test_config_pmasz( +static int SQLITE_TCLAPI test_config_pmasz( void * clientData, Tcl_Interp *interp, int objc, @@ -1303,7 +1303,7 @@ static int test_config_pmasz( ** ** Write a summary of unfreed memsys3 allocations to FILENAME. */ -static int test_dump_memsys3( +static int SQLITE_TCLAPI test_dump_memsys3( void * clientData, Tcl_Interp *interp, int objc, @@ -1339,7 +1339,7 @@ static int test_dump_memsys3( ** Return a list of three elements which are the sqlite3_status() return ** code, the current value, and the high-water mark value. */ -static int test_status( +static int SQLITE_TCLAPI test_status( void * clientData, Tcl_Interp *interp, int objc, @@ -1396,7 +1396,7 @@ static int test_status( ** Return a list of three elements which are the sqlite3_db_status() return ** code, the current value, and the high-water mark value. */ -static int test_db_status( +static int SQLITE_TCLAPI test_db_status( void * clientData, Tcl_Interp *interp, int objc, @@ -1457,7 +1457,7 @@ static int test_db_status( /* ** install_malloc_faultsim BOOLEAN */ -static int test_install_malloc_faultsim( +static int SQLITE_TCLAPI test_install_malloc_faultsim( void * clientData, Tcl_Interp *interp, int objc, @@ -1481,7 +1481,7 @@ static int test_install_malloc_faultsim( /* ** sqlite3_install_memsys3 */ -static int test_install_memsys3( +static int SQLITE_TCLAPI test_install_memsys3( void * clientData, Tcl_Interp *interp, int objc, @@ -1496,7 +1496,7 @@ static int test_install_memsys3( return TCL_OK; } -static int test_vfs_oom_test( +static int SQLITE_TCLAPI test_vfs_oom_test( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_multiplex.c b/src/test_multiplex.c index dffdb44941..e7ffa63a56 100644 --- a/src/test_multiplex.c +++ b/src/test_multiplex.c @@ -1233,6 +1233,9 @@ int sqlite3_multiplex_shutdown(int eForce){ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif extern const char *sqlite3ErrName(int); @@ -1240,7 +1243,7 @@ extern const char *sqlite3ErrName(int); /* ** tclcmd: sqlite3_multiplex_initialize NAME MAKEDEFAULT */ -static int test_multiplex_initialize( +static int SQLITE_TCLAPI test_multiplex_initialize( void * clientData, Tcl_Interp *interp, int objc, @@ -1271,7 +1274,7 @@ static int test_multiplex_initialize( /* ** tclcmd: sqlite3_multiplex_shutdown */ -static int test_multiplex_shutdown( +static int SQLITE_TCLAPI test_multiplex_shutdown( void * clientData, Tcl_Interp *interp, int objc, @@ -1299,7 +1302,7 @@ static int test_multiplex_shutdown( /* ** tclcmd: sqlite3_multiplex_dump */ -static int test_multiplex_dump( +static int SQLITE_TCLAPI test_multiplex_dump( void * clientData, Tcl_Interp *interp, int objc, @@ -1354,7 +1357,7 @@ static int test_multiplex_dump( /* ** Tclcmd: test_multiplex_control HANDLE DBNAME SUB-COMMAND ?INT-VALUE? */ -static int test_multiplex_control( +static int SQLITE_TCLAPI test_multiplex_control( ClientData cd, Tcl_Interp *interp, int objc, diff --git a/src/test_mutex.c b/src/test_mutex.c index 22375197b7..8f43e5ad30 100644 --- a/src/test_mutex.c +++ b/src/test_mutex.c @@ -156,7 +156,7 @@ static void counterMutexLeave(sqlite3_mutex *p){ /* ** sqlite3_shutdown */ -static int test_shutdown( +static int SQLITE_TCLAPI test_shutdown( void * clientData, Tcl_Interp *interp, int objc, @@ -177,7 +177,7 @@ static int test_shutdown( /* ** sqlite3_initialize */ -static int test_initialize( +static int SQLITE_TCLAPI test_initialize( void * clientData, Tcl_Interp *interp, int objc, @@ -198,7 +198,7 @@ static int test_initialize( /* ** install_mutex_counters BOOLEAN */ -static int test_install_mutex_counters( +static int SQLITE_TCLAPI test_install_mutex_counters( void * clientData, Tcl_Interp *interp, int objc, @@ -259,7 +259,7 @@ static int test_install_mutex_counters( /* ** read_mutex_counters */ -static int test_read_mutex_counters( +static int SQLITE_TCLAPI test_read_mutex_counters( void * clientData, Tcl_Interp *interp, int objc, @@ -288,7 +288,7 @@ static int test_read_mutex_counters( /* ** clear_mutex_counters */ -static int test_clear_mutex_counters( +static int SQLITE_TCLAPI test_clear_mutex_counters( void * clientData, Tcl_Interp *interp, int objc, @@ -312,7 +312,7 @@ static int test_clear_mutex_counters( ** will be invalid since the mutex has already been freed. The ** return pointer just checks to see if the mutex really was allocated. */ -static int test_alloc_mutex( +static int SQLITE_TCLAPI test_alloc_mutex( void * clientData, Tcl_Interp *interp, int objc, @@ -339,7 +339,7 @@ static int test_alloc_mutex( ** ** Or OPTION can be an raw integer. */ -static int test_config( +static int SQLITE_TCLAPI test_config( void * clientData, Tcl_Interp *interp, int objc, @@ -401,7 +401,7 @@ static sqlite3_mutex *getStaticMutexPointer( return counterMutexAlloc(iMutex); } -static int test_enter_static_mutex( +static int SQLITE_TCLAPI test_enter_static_mutex( void * clientData, Tcl_Interp *interp, int objc, @@ -420,7 +420,7 @@ static int test_enter_static_mutex( return TCL_OK; } -static int test_leave_static_mutex( +static int SQLITE_TCLAPI test_leave_static_mutex( void * clientData, Tcl_Interp *interp, int objc, @@ -439,7 +439,7 @@ static int test_leave_static_mutex( return TCL_OK; } -static int test_enter_db_mutex( +static int SQLITE_TCLAPI test_enter_db_mutex( void * clientData, Tcl_Interp *interp, int objc, @@ -458,7 +458,7 @@ static int test_enter_db_mutex( return TCL_OK; } -static int test_leave_db_mutex( +static int SQLITE_TCLAPI test_leave_db_mutex( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_osinst.c b/src/test_osinst.c index 5ab8ed5c93..a008baba45 100644 --- a/src/test_osinst.c +++ b/src/test_osinst.c @@ -1108,9 +1108,12 @@ int sqlite3_vfslog_register(sqlite3 *db){ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif -static int test_vfslog( +static int SQLITE_TCLAPI test_vfslog( void *clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_quota.c b/src/test_quota.c index 8ea48e5b53..e87e9772f6 100644 --- a/src/test_quota.c +++ b/src/test_quota.c @@ -111,7 +111,7 @@ struct quotaFile { /* ** An instance of the following object represents each open connection -** to a file that participates in quota tracking. This object is a +** to a file that participates in quota tracking. This object is a ** subclass of sqlite3_file. The sqlite3_file object for the underlying ** VFS is appended to this structure. */ @@ -154,11 +154,11 @@ static struct { */ sqlite3_vfs sThisVfs; - /* The sIoMethods defines the methods used by sqlite3_file objects + /* The sIoMethods defines the methods used by sqlite3_file objects ** associated with this shim. It is initialized at start-time and does ** not require a mutex. ** - ** When the underlying VFS is called to open a file, it might return + ** When the underlying VFS is called to open a file, it might return ** either a version 1 or a version 2 sqlite3_file object. This shim ** has to create a wrapper sqlite3_file of the same version. Hence ** there are two I/O method structures, one for version 1 and the other @@ -190,7 +190,7 @@ static struct { static void quotaEnter(void){ sqlite3_mutex_enter(gQuota.pMutex); } static void quotaLeave(void){ sqlite3_mutex_leave(gQuota.pMutex); } -/* Count the number of open files in a quotaGroup +/* Count the number of open files in a quotaGroup */ static int quotaGroupOpenFileCount(quotaGroup *pGroup){ int N = 0; @@ -399,7 +399,7 @@ static char *quota_utf8_to_mbcs(const char *zUtf8){ return zMbcs; #else return (char*)zUtf8; /* No-op on unix */ -#endif +#endif } /* @@ -410,7 +410,7 @@ static void quota_mbcs_free(char *zOld){ sqlite3_free(zOld); #else /* No-op on unix */ -#endif +#endif } /************************* VFS Method Wrappers *****************************/ @@ -428,7 +428,7 @@ static int quotaOpen( int flags, /* Flags to control the opening */ int *pOutFlags /* Flags showing results of opening */ ){ - int rc; /* Result code */ + int rc; /* Result code */ quotaConn *pQuotaOpen; /* The new quota file descriptor */ quotaFile *pFile; /* Corresponding quotaFile obj */ quotaGroup *pGroup; /* The group file belongs to */ @@ -488,7 +488,7 @@ static int quotaDelete( const char *zName, /* Name of file to be deleted */ int syncDir /* Do a directory sync after deleting */ ){ - int rc; /* Result code */ + int rc; /* Result code */ quotaFile *pFile; /* Files in the quota */ quotaGroup *pGroup; /* The group file belongs to */ sqlite3_vfs *pOrigVfs = gQuota.pOrigVfs; /* Real VFS */ @@ -581,7 +581,7 @@ static int quotaWrite( szNew = pGroup->iSize - pFile->iSize + iEnd; if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){ if( pGroup->xCallback ){ - pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew, + pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew, pGroup->pArg); } if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){ @@ -738,7 +738,7 @@ static int quotaShmUnmap(sqlite3_file *pConn, int deleteFlag){ /* ** Initialize the quota VFS shim. Use the VFS named zOrigVfsName ** as the VFS that does the actual work. Use the default if -** zOrigVfsName==NULL. +** zOrigVfsName==NULL. ** ** The quota VFS shim is named "quota". It will become the default ** VFS if makeDefault is non-zero. @@ -908,7 +908,7 @@ int sqlite3_quota_file(const char *zFilename){ if( rc==SQLITE_OK ){ zFull[strlen(zFull)+1] = '\0'; - rc = quotaOpen(&gQuota.sThisVfs, zFull, fd, + rc = quotaOpen(&gQuota.sThisVfs, zFull, fd, SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_DB, &outFlags); if( rc==SQLITE_OK ){ fd->pMethods->xFileSize(fd, &iSize); @@ -1016,7 +1016,7 @@ size_t sqlite3_quota_fwrite( szNew = pGroup->iSize - pFile->iSize + iEnd; if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){ if( pGroup->xCallback ){ - pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew, + pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew, pGroup->pArg); } if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){ @@ -1203,7 +1203,7 @@ sqlite3_int64 sqlite3_quota_file_truesize(quota_FILE *p){ sqlite3_int64 sqlite3_quota_file_size(quota_FILE *p){ return p->pFile ? p->pFile->iSize : -1; } - + /* ** Determine the amount of data in bytes available for reading ** in the given file. @@ -1275,13 +1275,16 @@ int sqlite3_quota_remove(const char *zFilename){ sqlite3_free(zFull); return rc; } - + /***************************** Test Code ***********************************/ #ifdef SQLITE_TEST #if defined(INCLUDE_SQLITE_TCL_H) # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif /* @@ -1354,7 +1357,7 @@ static void tclCallbackDestructor(void *pObj){ /* ** tclcmd: sqlite3_quota_initialize NAME MAKEDEFAULT */ -static int test_quota_initialize( +static int SQLITE_TCLAPI test_quota_initialize( void * clientData, Tcl_Interp *interp, int objc, @@ -1383,7 +1386,7 @@ static int test_quota_initialize( /* ** tclcmd: sqlite3_quota_shutdown */ -static int test_quota_shutdown( +static int SQLITE_TCLAPI test_quota_shutdown( void * clientData, Tcl_Interp *interp, int objc, @@ -1406,7 +1409,7 @@ static int test_quota_shutdown( /* ** tclcmd: sqlite3_quota_set PATTERN LIMIT SCRIPT */ -static int test_quota_set( +static int SQLITE_TCLAPI test_quota_set( void * clientData, Tcl_Interp *interp, int objc, @@ -1460,7 +1463,7 @@ static int test_quota_set( /* ** tclcmd: sqlite3_quota_file FILENAME */ -static int test_quota_file( +static int SQLITE_TCLAPI test_quota_file( void * clientData, Tcl_Interp *interp, int objc, @@ -1486,7 +1489,7 @@ static int test_quota_file( /* ** tclcmd: sqlite3_quota_dump */ -static int test_quota_dump( +static int SQLITE_TCLAPI test_quota_dump( void * clientData, Tcl_Interp *interp, int objc, @@ -1534,7 +1537,7 @@ static int test_quota_dump( /* ** tclcmd: sqlite3_quota_fopen FILENAME MODE */ -static int test_quota_fopen( +static int SQLITE_TCLAPI test_quota_fopen( void * clientData, Tcl_Interp *interp, int objc, @@ -1564,7 +1567,7 @@ extern void *sqlite3TestTextToPtr(const char*); /* ** tclcmd: sqlite3_quota_fread HANDLE SIZE NELEM */ -static int test_quota_fread( +static int SQLITE_TCLAPI test_quota_fread( void * clientData, Tcl_Interp *interp, int objc, @@ -1598,7 +1601,7 @@ static int test_quota_fread( /* ** tclcmd: sqlite3_quota_fwrite HANDLE SIZE NELEM CONTENT */ -static int test_quota_fwrite( +static int SQLITE_TCLAPI test_quota_fwrite( void * clientData, Tcl_Interp *interp, int objc, @@ -1626,7 +1629,7 @@ static int test_quota_fwrite( /* ** tclcmd: sqlite3_quota_fclose HANDLE */ -static int test_quota_fclose( +static int SQLITE_TCLAPI test_quota_fclose( void * clientData, Tcl_Interp *interp, int objc, @@ -1648,7 +1651,7 @@ static int test_quota_fclose( /* ** tclcmd: sqlite3_quota_fflush HANDLE ?HARDSYNC? */ -static int test_quota_fflush( +static int SQLITE_TCLAPI test_quota_fflush( void * clientData, Tcl_Interp *interp, int objc, @@ -1674,7 +1677,7 @@ static int test_quota_fflush( /* ** tclcmd: sqlite3_quota_fseek HANDLE OFFSET WHENCE */ -static int test_quota_fseek( +static int SQLITE_TCLAPI test_quota_fseek( void * clientData, Tcl_Interp *interp, int objc, @@ -1712,7 +1715,7 @@ static int test_quota_fseek( /* ** tclcmd: sqlite3_quota_rewind HANDLE */ -static int test_quota_rewind( +static int SQLITE_TCLAPI test_quota_rewind( void * clientData, Tcl_Interp *interp, int objc, @@ -1731,7 +1734,7 @@ static int test_quota_rewind( /* ** tclcmd: sqlite3_quota_ftell HANDLE */ -static int test_quota_ftell( +static int SQLITE_TCLAPI test_quota_ftell( void * clientData, Tcl_Interp *interp, int objc, @@ -1752,7 +1755,7 @@ static int test_quota_ftell( /* ** tclcmd: sqlite3_quota_ftruncate HANDLE SIZE */ -static int test_quota_ftruncate( +static int SQLITE_TCLAPI test_quota_ftruncate( void * clientData, Tcl_Interp *interp, int objc, @@ -1777,7 +1780,7 @@ static int test_quota_ftruncate( /* ** tclcmd: sqlite3_quota_file_size HANDLE */ -static int test_quota_file_size( +static int SQLITE_TCLAPI test_quota_file_size( void * clientData, Tcl_Interp *interp, int objc, @@ -1798,7 +1801,7 @@ static int test_quota_file_size( /* ** tclcmd: sqlite3_quota_file_truesize HANDLE */ -static int test_quota_file_truesize( +static int SQLITE_TCLAPI test_quota_file_truesize( void * clientData, Tcl_Interp *interp, int objc, @@ -1819,7 +1822,7 @@ static int test_quota_file_truesize( /* ** tclcmd: sqlite3_quota_file_mtime HANDLE */ -static int test_quota_file_mtime( +static int SQLITE_TCLAPI test_quota_file_mtime( void * clientData, Tcl_Interp *interp, int objc, @@ -1842,7 +1845,7 @@ static int test_quota_file_mtime( /* ** tclcmd: sqlite3_quota_remove FILENAME */ -static int test_quota_remove( +static int SQLITE_TCLAPI test_quota_remove( void * clientData, Tcl_Interp *interp, int objc, @@ -1866,7 +1869,7 @@ static int test_quota_remove( ** Test the glob pattern matching. Return 1 if TEXT matches PATTERN ** and return 0 if it does not. */ -static int test_quota_glob( +static int SQLITE_TCLAPI test_quota_glob( void * clientData, Tcl_Interp *interp, int objc, @@ -1892,7 +1895,7 @@ static int test_quota_glob( ** Return the number of bytes from the current file point to the end of ** the file. */ -static int test_quota_file_available( +static int SQLITE_TCLAPI test_quota_file_available( void * clientData, Tcl_Interp *interp, int objc, @@ -1915,7 +1918,7 @@ static int test_quota_file_available( ** ** Return true if the file handle is in the error state. */ -static int test_quota_ferror( +static int SQLITE_TCLAPI test_quota_ferror( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_rtree.c b/src/test_rtree.c index 1f15566f97..0c6dbf3cd7 100644 --- a/src/test_rtree.c +++ b/src/test_rtree.c @@ -440,7 +440,7 @@ static int cube_geom( } #endif /* SQLITE_ENABLE_RTREE */ -static int register_cube_geom( +static int SQLITE_TCLAPI register_cube_geom( void * clientData, Tcl_Interp *interp, int objc, @@ -468,7 +468,7 @@ static int register_cube_geom( return TCL_OK; } -static int register_circle_geom( +static int SQLITE_TCLAPI register_circle_geom( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_schema.c b/src/test_schema.c index f2bd3b3520..cdf085797f 100644 --- a/src/test_schema.c +++ b/src/test_schema.c @@ -306,7 +306,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb); /* ** Register the schema virtual table module. */ -static int register_schema_module( +static int SQLITE_TCLAPI register_schema_module( ClientData clientData, /* Not used */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_superlock.c b/src/test_superlock.c index cad5b51f0f..45d0d623a0 100644 --- a/src/test_superlock.c +++ b/src/test_superlock.c @@ -260,6 +260,9 @@ int sqlite3demo_superlock( # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif struct InterpAndScript { @@ -268,11 +271,11 @@ struct InterpAndScript { }; typedef struct InterpAndScript InterpAndScript; -static void superunlock_del(ClientData cd){ +static void SQLITE_TCLAPI superunlock_del(ClientData cd){ sqlite3demo_superunlock((void *)cd); } -static int superunlock_cmd( +static int SQLITE_TCLAPI superunlock_cmd( ClientData cd, Tcl_Interp *interp, int objc, @@ -304,7 +307,7 @@ static int superlock_busy(void *pCtx, int nBusy){ /* ** Tclcmd: sqlite3demo_superlock CMDNAME PATH VFS BUSY-HANDLER-SCRIPT */ -static int superlock_cmd( +static int SQLITE_TCLAPI superlock_cmd( ClientData cd, Tcl_Interp *interp, int objc, diff --git a/src/test_syscall.c b/src/test_syscall.c index eab9895186..947f9a9d9d 100644 --- a/src/test_syscall.c +++ b/src/test_syscall.c @@ -422,7 +422,7 @@ static void *ts_mremap(void *a, size_t b, size_t c, int d, ...){ return orig_mremap(a, b, c, d, pArg); } -static int test_syscall_install( +static int SQLITE_TCLAPI test_syscall_install( void * clientData, Tcl_Interp *interp, int objc, @@ -458,7 +458,7 @@ static int test_syscall_install( return TCL_OK; } -static int test_syscall_uninstall( +static int SQLITE_TCLAPI test_syscall_uninstall( void * clientData, Tcl_Interp *interp, int objc, @@ -482,7 +482,7 @@ static int test_syscall_uninstall( return TCL_OK; } -static int test_syscall_reset( +static int SQLITE_TCLAPI test_syscall_reset( void * clientData, Tcl_Interp *interp, int objc, @@ -520,7 +520,7 @@ static int test_syscall_reset( return TCL_OK; } -static int test_syscall_exists( +static int SQLITE_TCLAPI test_syscall_exists( void * clientData, Tcl_Interp *interp, int objc, @@ -541,7 +541,7 @@ static int test_syscall_exists( return TCL_OK; } -static int test_syscall_fault( +static int SQLITE_TCLAPI test_syscall_fault( void * clientData, Tcl_Interp *interp, int objc, @@ -570,7 +570,7 @@ static int test_syscall_fault( return TCL_OK; } -static int test_syscall_errno( +static int SQLITE_TCLAPI test_syscall_errno( void * clientData, Tcl_Interp *interp, int objc, @@ -616,7 +616,7 @@ static int test_syscall_errno( return TCL_OK; } -static int test_syscall_list( +static int SQLITE_TCLAPI test_syscall_list( void * clientData, Tcl_Interp *interp, int objc, @@ -646,7 +646,7 @@ static int test_syscall_list( return TCL_OK; } -static int test_syscall_defaultvfs( +static int SQLITE_TCLAPI test_syscall_defaultvfs( void * clientData, Tcl_Interp *interp, int objc, @@ -668,7 +668,7 @@ static int ts_getpagesize(void){ return gSyscall.pgsz; } -static int test_syscall_pagesize( +static int SQLITE_TCLAPI test_syscall_pagesize( void * clientData, Tcl_Interp *interp, int objc, @@ -703,7 +703,7 @@ static int test_syscall_pagesize( return TCL_OK; } -static int test_syscall( +static int SQLITE_TCLAPI test_syscall( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_tclvar.c b/src/test_tclvar.c index 95a065c853..8f7352112d 100644 --- a/src/test_tclvar.c +++ b/src/test_tclvar.c @@ -411,7 +411,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb); /* ** Register the echo virtual table module. */ -static int register_tclvar_module( +static int SQLITE_TCLAPI register_tclvar_module( ClientData clientData, /* Pointer to sqlite3_enable_XXX function */ Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ int objc, /* Number of arguments */ diff --git a/src/test_thread.c b/src/test_thread.c index 1fd646e769..d67b4be10b 100644 --- a/src/test_thread.c +++ b/src/test_thread.c @@ -76,7 +76,7 @@ extern int sqlite3TestErrCode(Tcl_Interp *, sqlite3 *, int); /* ** Handler for events of type EvalEvent. */ -static int tclScriptEvent(Tcl_Event *evPtr, int flags){ +static int SQLITE_TCLAPI tclScriptEvent(Tcl_Event *evPtr, int flags){ int rc; EvalEvent *p = (EvalEvent *)evPtr; rc = Tcl_Eval(p->interp, p->zScript); @@ -171,7 +171,7 @@ static Tcl_ThreadCreateType tclScriptThread(ClientData pSqlThread){ ** ** The caller can wait for the script to terminate using [vwait VARNAME]. */ -static int sqlthread_spawn( +static int SQLITE_TCLAPI sqlthread_spawn( ClientData clientData, Tcl_Interp *interp, int objc, @@ -224,7 +224,7 @@ static int sqlthread_spawn( ** ** NOTE: At the moment, this doesn't work. FIXME. */ -static int sqlthread_parent( +static int SQLITE_TCLAPI sqlthread_parent( ClientData clientData, Tcl_Interp *interp, int objc, @@ -269,7 +269,7 @@ static int xBusy(void *pArg, int nBusy){ ** Open a database handle and return the string representation of ** the pointer value. */ -static int sqlthread_open( +static int SQLITE_TCLAPI sqlthread_open( ClientData clientData, Tcl_Interp *interp, int objc, @@ -319,7 +319,7 @@ static int sqlthread_open( ** Return the current thread-id (Tcl_GetCurrentThread()) cast to ** an integer. */ -static int sqlthread_id( +static int SQLITE_TCLAPI sqlthread_id( ClientData clientData, Tcl_Interp *interp, int objc, @@ -337,7 +337,7 @@ static int sqlthread_id( /* ** Dispatch routine for the sub-commands of [sqlthread]. */ -static int sqlthread_proc( +static int SQLITE_TCLAPI sqlthread_proc( ClientData clientData, Tcl_Interp *interp, int objc, @@ -385,7 +385,7 @@ static int sqlthread_proc( ** implemented as a script in Tcl 8.5, it is not usually available to ** testfixture. */ -static int clock_seconds_proc( +static int SQLITE_TCLAPI clock_seconds_proc( ClientData clientData, Tcl_Interp *interp, int objc, @@ -547,7 +547,7 @@ int sqlite3_blocking_prepare_v2( ** ** Advance the statement to the next row. */ -static int blocking_step_proc( +static int SQLITE_TCLAPI blocking_step_proc( void * clientData, Tcl_Interp *interp, int objc, @@ -573,7 +573,7 @@ static int blocking_step_proc( ** Usage: sqlite3_blocking_prepare_v2 DB sql bytes ?tailvar? ** Usage: sqlite3_nonblocking_prepare_v2 DB sql bytes ?tailvar? */ -static int blocking_prepare_v2_proc( +static int SQLITE_TCLAPI blocking_prepare_v2_proc( void * clientData, Tcl_Interp *interp, int objc, diff --git a/src/test_vfs.c b/src/test_vfs.c index acc1c6682e..fb987a6163 100644 --- a/src/test_vfs.c +++ b/src/test_vfs.c @@ -1040,7 +1040,7 @@ static int tvfsUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *p){ return sqlite3OsUnfetch(pFd->pReal, iOfst, p); } -static int testvfs_obj_cmd( +static int SQLITE_TCLAPI testvfs_obj_cmd( ClientData cd, Tcl_Interp *interp, int objc, @@ -1352,7 +1352,7 @@ static int testvfs_obj_cmd( return TCL_OK; } -static void testvfs_obj_del(ClientData cd){ +static void SQLITE_TCLAPI testvfs_obj_del(ClientData cd){ Testvfs *p = (Testvfs *)cd; if( p->pScript ) Tcl_DecrRefCount(p->pScript); sqlite3_vfs_unregister(p->pVfs); @@ -1395,7 +1395,7 @@ static void testvfs_obj_del(ClientData cd){ ** ** where LOCK is of the form "OFFSET NBYTE lock/unlock shared/exclusive" */ -static int testvfs_cmd( +static int SQLITE_TCLAPI testvfs_cmd( ClientData cd, Tcl_Interp *interp, int objc, From aa0325872fa725d1c2622d3bd4f8b87a7c137bc3 Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 28 Jul 2016 17:24:16 +0000 Subject: [PATCH 07/24] Improvements to the way the COMPILER compile-time option is set when compiling with Clang. FossilOrigin-Name: 81f9cf86c48f3cd43755ded4dc97388ec650f8af --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/ctime.c | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index d4a4aa1bdd..c71c10048d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C New\stest\scase\sto\sinsure\slegacy\sCREATE\sTABLE\ssyntax\sis\ssupported. -D 2016-07-28T12:52:30.552 +C Improvements\sto\sthe\sway\sthe\sCOMPILER\scompile-time\soption\sis\sset\swhen\scompiling\nwith\sClang. +D 2016-07-28T17:24:16.495 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a @@ -333,7 +333,7 @@ F src/btreeInt.h c18b7d2a3494695133e4e60ee36061d37f45d9a5 F src/build.c d1fdfd7ab8f5447e494ef15825973bf0719527c6 F src/callback.c 2e76147783386374bf01b227f752c81ec872d730 F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e -F src/ctime.c 61949e83c4c36e37195a8398ebc752780b534d95 +F src/ctime.c e77f3dc297b4b65c96da78b4ae4272fdfae863d7 F src/date.c 1cc9fb516ec9932c6fd4d2a0d2f8bc4480145c39 F src/dbstat.c 4f6f7f52b49beb9636ffbd517cfe44a402ba4ad0 F src/delete.c 4aba4214a377ce8ddde2d2e609777bcc8235200f @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 9e2b26811452a5011d0a97a689636fa4409da856 -R d76a2fc86bbf1915af6bf1dd54a28237 +P 6feff15cae8f0427be790355841d49c479c1c586 +R 675b3da4289ec2d84ea94ee475054664 U drh -Z 803b725d666d5af434be7409c67eabe6 +Z 0881f39f36c917424fb94c651f3aec11 diff --git a/manifest.uuid b/manifest.uuid index f4495ea5c1..060502d932 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6feff15cae8f0427be790355841d49c479c1c586 \ No newline at end of file +81f9cf86c48f3cd43755ded4dc97388ec650f8af \ No newline at end of file diff --git a/src/ctime.c b/src/ctime.c index 1a7c69f3bf..09587ea88e 100644 --- a/src/ctime.c +++ b/src/ctime.c @@ -45,8 +45,10 @@ static const char * const azCompileOpt[] = { #if SQLITE_CHECK_PAGES "CHECK_PAGES", #endif -#if defined(__clang__) && defined(__clang_version__) - "COMPILER=clang-" __clang_version__, +#if defined(__clang__) && defined(__clang_major__) + "COMPILER=clang-" CTIMEOPT_VAL(__clang_major__) "." + CTIMEOPT_VAL(__clang_minor__) "." + CTIMEOPT_VAL(__clang_patchlevel__), #elif defined(_MSC_VER) "COMPILER=msvc-" CTIMEOPT_VAL(_MSC_VER), #elif defined(__GNUC__) && defined(__VERSION__) From a121cc7c60e13e5dae02176631a72e3333f70302 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 18:06:52 +0000 Subject: [PATCH 08/24] Adjustments to get 'testfixture.exe' compiling with Tcl 8.6 when __stdcall is enabled. FossilOrigin-Name: 90e89ec9c8efff057a9e43c612427fc5c97ab52d --- Makefile.msc | 2 +- manifest | 14 +++++++------- manifest.uuid | 2 +- src/tclsqlite.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index 4a8283731d..ca3e19aab8 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1994,7 +1994,7 @@ sqlite_tclDecls.h: echo # define SQLITE_TCLAPI >> sqlite_tclDecls.h echo #endif >> sqlite_tclDecls.h type "$(TCLINCDIR)\tclDecls.h" \ - | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?.*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \ | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \ | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \ | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" >> sqlite_tclDecls.h diff --git a/manifest b/manifest index 1be1262c7e..4e202a429f 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C Make\ssure\sthe\sSQLITE_TCLAPI\smacro\sis\salways\sdefined. -D 2016-07-28T17:11:20.162 +C Adjustments\sto\sget\s'testfixture.exe'\scompiling\swith\sTcl\s8.6\swhen\s__stdcall\sis\senabled. +D 2016-07-28T18:06:52.992 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc 1e5399407885d69150e2659f4710b5712a1e6cef +F Makefile.msc c7934e2d3ef07c440ad48e2233c0cc8364e72aff F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -392,7 +392,7 @@ F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052 F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9 -F src/tclsqlite.c a9c6e33c44efa93d176ce5e0887d5d533c98b429 +F src/tclsqlite.c 342379845d52c62a778c76c3dd0a2695af723e04 F src/test1.c 906a04b649c7139e943193a3905d583e325c30c7 F src/test2.c b7174313e993754303a8b33c43df7c44b46857ab F src/test3.c 1339a40be39650ae83894b6578f971dc7f96ea8a @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 36b72fd609cf151f3db0e65b450d7cd515f2ac49 -R cb104ece8c53bb381905efecad762caf +P f2f1323cc4d2ad2d6794dbfae8d50b747213e85d +R f48b462f2c7e74ed51a21c0e6f026658 U mistachkin -Z 5c80ddf3854cd75da2e73aafdf02283f +Z 339efe4a28b4c084d0a9150e8c742a8a diff --git a/manifest.uuid b/manifest.uuid index 1a85a325af..e9bf450c4c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f2f1323cc4d2ad2d6794dbfae8d50b747213e85d \ No newline at end of file +90e89ec9c8efff057a9e43c612427fc5c97ab52d \ No newline at end of file diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 527dc488ee..bc94a5ff7f 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -1151,7 +1151,7 @@ static char *local_getline(char *zPrompt, FILE *in){ ** It is invoked after evaluating the script SCRIPT to commit or rollback ** the transaction or savepoint opened by the [transaction] command. */ -static int DbTransPostCmd( +static int SQLITE_TCLAPI DbTransPostCmd( ClientData data[], /* data[0] is the Sqlite3Db* for $db */ Tcl_Interp *interp, /* Tcl interpreter */ int result /* Result of evaluating SCRIPT */ @@ -1698,7 +1698,7 @@ static int DbUseNre(void){ ** ** $db eval SQL ?ARRAYNAME? SCRIPT */ -static int DbEvalNextCmd( +static int SQLITE_TCLAPI DbEvalNextCmd( ClientData data[], /* data[0] is the (DbEvalContext*) */ Tcl_Interp *interp, /* Tcl interpreter */ int result /* Result so far */ @@ -3256,7 +3256,7 @@ static int SQLITE_TCLAPI DbObjCmd( ** Adaptor that provides an objCmd interface to the NRE-enabled ** interface implementation. */ -static int DbObjCmdAdaptor( +static int SQLITE_TCLAPI DbObjCmdAdaptor( void *cd, Tcl_Interp *interp, int objc, From 7c60b266913db65ced9210a9cc4e50d15356f48c Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 18:18:53 +0000 Subject: [PATCH 09/24] Fixup reserved function pointers in the Tcl stubs table and several macros containing Tcl function pointers. FossilOrigin-Name: 959cd0131a5c717679b6e250229794679efe7f69 --- Makefile.msc | 3 ++- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index ca3e19aab8..1257ce2ba3 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1997,7 +1997,8 @@ sqlite_tclDecls.h: | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \ | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \ | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \ - | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" >> sqlite_tclDecls.h + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> sqlite_tclDecls.h sqlite_tcl.h: sqlite_tclDecls.h type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \ diff --git a/manifest b/manifest index 4e202a429f..990660b97b 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C Adjustments\sto\sget\s'testfixture.exe'\scompiling\swith\sTcl\s8.6\swhen\s__stdcall\sis\senabled. -D 2016-07-28T18:06:52.992 +C Fixup\sreserved\sfunction\spointers\sin\sthe\sTcl\sstubs\stable\sand\sseveral\smacros\scontaining\sTcl\sfunction\spointers. +D 2016-07-28T18:18:53.411 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc c7934e2d3ef07c440ad48e2233c0cc8364e72aff +F Makefile.msc 959d56a9c117c3dc6f407a71aaa9fbad2df0b3c7 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P f2f1323cc4d2ad2d6794dbfae8d50b747213e85d -R f48b462f2c7e74ed51a21c0e6f026658 +P 90e89ec9c8efff057a9e43c612427fc5c97ab52d +R d171dcc0a06f2c3b789ca76207152f9d U mistachkin -Z 339efe4a28b4c084d0a9150e8c742a8a +Z 48ca1d4dc91e624fdf594bf2bfd310c3 diff --git a/manifest.uuid b/manifest.uuid index e9bf450c4c..1992938c42 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -90e89ec9c8efff057a9e43c612427fc5c97ab52d \ No newline at end of file +959cd0131a5c717679b6e250229794679efe7f69 \ No newline at end of file From a8914faaaa981c87f193eb62477e7ba7d0affeed Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 28 Jul 2016 18:38:13 +0000 Subject: [PATCH 10/24] Disable the authorizer callback when reparsing the schema. This avoids undesirable authorization failures following an ALTER TABLE. FossilOrigin-Name: 805d01cdabb48a69eb986a7f084e53eb25d76b7f --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- src/auth.c | 1 + test/auth2.test | 12 ------------ test/auth3.test | 21 +++++++++++++++++++-- 5 files changed, 29 insertions(+), 23 deletions(-) diff --git a/manifest b/manifest index c71c10048d..b3d969ce87 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Improvements\sto\sthe\sway\sthe\sCOMPILER\scompile-time\soption\sis\sset\swhen\scompiling\nwith\sClang. -D 2016-07-28T17:24:16.495 +C Disable\sthe\sauthorizer\scallback\swhen\sreparsing\sthe\sschema.\s\sThis\savoids\nundesirable\sauthorization\sfailures\sfollowing\san\sALTER\sTABLE. +D 2016-07-28T18:38:13.187 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a @@ -323,7 +323,7 @@ F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a F src/alter.c cc28ab933ae615b22add0d609794ffb6596b42ea F src/analyze.c 37fedc80ac966ce1745811746e68e4d8fa64c7fe F src/attach.c 771153bd1f4ab0b97a44a13dde2c7e5e1efeba22 -F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240 +F src/auth.c 5c8e0f37f785f935f589496801edd19840485853 F src/backup.c 6df65fdd569c901a418887a1a76f82ec35044556 F src/bitvec.c 3ee4c8b2c94ed3a7377256e18199e6ff5cf33f63 F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73 @@ -506,8 +506,8 @@ F test/attach3.test 359eb65d00102cdfcef6fa4e81dc1648f8f80b27 F test/attach4.test 53bf502f17647c6d6c5add46dda6bac8b6f4665c F test/attachmalloc.test 3a4bfca9545bfe906a8d2e622de10fbac5b711b0 F test/auth.test 872a122b3977c1d1bb9fd637dc20016e5c01880f -F test/auth2.test 264c6af53cad9aba5218c68bbe18036e39007bfa -F test/auth3.test 5cfa94ed90c6617c42b7ba4b133fd79678b251c7 +F test/auth2.test 9eb7fce9f34bf1f50d3f366fb3e606be5a2000a1 +F test/auth3.test b810826b193831929951c0d50783a200e5ef6b72 F test/autoinc.test c58912526998a39e11f66b533e23cfabea7f25b7 F test/autoindex1.test 14b63a9f1e405fe6d5bfc8c8d00249c2ebaf13ea F test/autoindex2.test 12ef578928102baaa0dc23ad397601a2f4ecb0df @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 6feff15cae8f0427be790355841d49c479c1c586 -R 675b3da4289ec2d84ea94ee475054664 +P 81f9cf86c48f3cd43755ded4dc97388ec650f8af +R ae8bfc7314166cec8de9b44e7e9859e8 U drh -Z 0881f39f36c917424fb94c651f3aec11 +Z 7b0f6930a62d02daa8f4147d6dafd3a6 diff --git a/manifest.uuid b/manifest.uuid index 060502d932..53827a1161 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -81f9cf86c48f3cd43755ded4dc97388ec650f8af \ No newline at end of file +805d01cdabb48a69eb986a7f084e53eb25d76b7f \ No newline at end of file diff --git a/src/auth.c b/src/auth.c index 9768fc2fc0..8a3f8e7d08 100644 --- a/src/auth.c +++ b/src/auth.c @@ -111,6 +111,7 @@ int sqlite3AuthReadCol( char *zDb = db->aDb[iDb].zName; /* Name of attached database */ int rc; /* Auth callback return code */ + if( db->init.busy ) return SQLITE_OK; rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext #ifdef SQLITE_USER_AUTHENTICATION ,db->auth.zAuthUser diff --git a/test/auth2.test b/test/auth2.test index a9d64d08af..08d46cac57 100644 --- a/test/auth2.test +++ b/test/auth2.test @@ -98,12 +98,6 @@ SQLITE_UPDATE sqlite_master tbl_name main {} SQLITE_UPDATE sqlite_master rootpage main {} SQLITE_UPDATE sqlite_master sql main {} SQLITE_READ sqlite_master ROWID main {} -SQLITE_READ sqlite_master name main {} -SQLITE_READ sqlite_master rootpage main {} -SQLITE_READ sqlite_master sql main {} -SQLITE_READ sqlite_master tbl_name main {} -SQLITE_READ sqlite_master type main {} -SQLITE_READ sqlite_master ROWID main {} } do_test auth2-2.2 { set ::authargs {} @@ -119,12 +113,6 @@ SQLITE_UPDATE sqlite_master tbl_name main {} SQLITE_UPDATE sqlite_master rootpage main {} SQLITE_UPDATE sqlite_master sql main {} SQLITE_READ sqlite_master ROWID main {} -SQLITE_READ sqlite_master name main {} -SQLITE_READ sqlite_master rootpage main {} -SQLITE_READ sqlite_master sql main {} -SQLITE_READ sqlite_master tbl_name main {} -SQLITE_READ sqlite_master type main {} -SQLITE_READ sqlite_master ROWID main {} } do_test auth2-2.3 { set ::authargs {} diff --git a/test/auth3.test b/test/auth3.test index eef10b398f..ca7e16c84c 100644 --- a/test/auth3.test +++ b/test/auth3.test @@ -12,8 +12,7 @@ # Test that the truncate optimization is disabled if the SQLITE_DELETE # authorization callback returns SQLITE_IGNORE. # -# $Id: auth3.test,v 1.2 2009/05/04 01:58:31 drh Exp $ -# +# Test that authorizer is disabled during schema parsing. set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -108,4 +107,22 @@ do_test auth3-2.2 { set sqlite_search_count } {1} +# 2016-07-28. A problem report from a private client complaining about +# an authorizer failure during an ALTER TABLE. The solution (I think) is +# to disable the authorizer during schema parsing. +# +proc auth {code args} { + if {$code=="SQLITE_READ" && [regexp {DoNotRead} $args]} { + return SQLITE_DENY + } + return SQLITE_OK +} +do_execsql_test auth3-3.0 { + CREATE TEMPORARY TABLE TempTable ( + key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE, + value TEXT NOT NULL ON CONFLICT FAIL); + ALTER TABLE TempTable RENAME TO DoNotRead; + SELECT name FROM sqlite_temp_master; +} {DoNotRead sqlite_autoindex_DoNotRead_1} + finish_test From c0bebc1dcfe7711b80d3a3333d35c991849785ed Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 18:49:20 +0000 Subject: [PATCH 11/24] All SQLite API functions and callbacks in the 'sqlite3ext.h' header file must be decorated with the calling convention. FossilOrigin-Name: 97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f --- Makefile.msc | 3 ++- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index 1257ce2ba3..d2c53a0385 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1846,7 +1846,8 @@ $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) sqlite3ext.h: .target_source - copy tsrc\sqlite3ext.h . + type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \ diff --git a/manifest b/manifest index 990660b97b..bcfd6a51fa 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C Fixup\sreserved\sfunction\spointers\sin\sthe\sTcl\sstubs\stable\sand\sseveral\smacros\scontaining\sTcl\sfunction\spointers. -D 2016-07-28T18:18:53.411 +C All\sSQLite\sAPI\sfunctions\sand\scallbacks\sin\sthe\s'sqlite3ext.h'\sheader\sfile\smust\sbe\sdecorated\swith\sthe\scalling\sconvention. +D 2016-07-28T18:49:20.480 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc 959d56a9c117c3dc6f407a71aaa9fbad2df0b3c7 +F Makefile.msc b8894e579e4a5f32d61eb9309dbdbd7c883d2e87 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 90e89ec9c8efff057a9e43c612427fc5c97ab52d -R d171dcc0a06f2c3b789ca76207152f9d +P 959cd0131a5c717679b6e250229794679efe7f69 +R 5c0ac8119f9b9a2ca4c809f0833a7b7c U mistachkin -Z 48ca1d4dc91e624fdf594bf2bfd310c3 +Z 4646b26f0f26be9837f9ae84f1defbff diff --git a/manifest.uuid b/manifest.uuid index 1992938c42..d28a372fd5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -959cd0131a5c717679b6e250229794679efe7f69 \ No newline at end of file +97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f \ No newline at end of file From e37f7397c97c75bc9c124564568f12253ee4533d Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 19:28:35 +0000 Subject: [PATCH 12/24] The 'sqlite3ext.h' content should be processed before being included in the amalgamation. FossilOrigin-Name: cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1 --- Makefile.msc | 3 ++- manifest | 17 ++++++++--------- manifest.uuid | 2 +- tool/mksqlite3c.tcl | 1 - 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index d2c53a0385..b4cb94a5b8 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1359,7 +1359,7 @@ HDR = \ parse.h \ $(TOP)\src\pragma.h \ $(SQLITE3H) \ - $(TOP)\src\sqlite3ext.h \ + sqlite3ext.h \ $(TOP)\src\sqliteInt.h \ $(TOP)\src\sqliteLimit.h \ $(TOP)\src\vdbe.h \ @@ -1848,6 +1848,7 @@ $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION sqlite3ext.h: .target_source type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \ | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h + copy /Y sqlite3ext.h tsrc\sqlite3ext.h mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \ diff --git a/manifest b/manifest index 7b451988d9..4df76977b0 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C Decorate\sall\sinterfaces\swith\scalling\sconvention\smacros. -D 2016-07-28T18:55:57.809 +C The\s'sqlite3ext.h'\scontent\sshould\sbe\sprocessed\sbefore\sbeing\sincluded\sin\sthe\samalgamation. +D 2016-07-28T19:28:35.475 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc b8894e579e4a5f32d61eb9309dbdbd7c883d2e87 +F Makefile.msc eefec7a26bf73bb04f2241058e23a3ec8a43f656 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -1449,7 +1449,7 @@ F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl f0d5bb266d1d388cf86fce5ba01a891e95d72d41 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mksqlite3c-noext.tcl aa58ea3be311c81821c2cd3209f55e46b07ab656 -F tool/mksqlite3c.tcl a52ead27e2ac5d4b616e945a0601f628f4328329 +F tool/mksqlite3c.tcl 655181fb25f69b3524b30efd0750c43513415216 F tool/mksqlite3h.tcl cf5cd68028e69a51ed5c76042672664201f0f756 F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl 4abcaf3267171b2faadaf9b82a0dfbaa6e98f8b7 @@ -1508,8 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 805d01cdabb48a69eb986a7f084e53eb25d76b7f 97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f -R 8897711bcf29ba23a6ba0e1e7c3853bd -T +closed 97fc6e4328fe72cdd10f11a4b4bc9ce14bdc537f -U drh -Z 6ec050f366e0cbc18c7d1fd514c95e5b +P fd784887e125bf95f4799ad09cbcba6795173487 +R 159053f8c66afb3fed693021893388d2 +U mistachkin +Z 1fc3620b6fdad23d7ecfea7d673497bf diff --git a/manifest.uuid b/manifest.uuid index 76c400fd3d..ad3e416aac 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -fd784887e125bf95f4799ad09cbcba6795173487 \ No newline at end of file +cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1 \ No newline at end of file diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index b7561cfa5b..c5f765ed1c 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -112,7 +112,6 @@ foreach hdr { pragma.h rtree.h sqlite3session.h - sqlite3ext.h sqlite3.h sqlite3ext.h sqlite3rbu.h From 44e95d4f028e537c411e746e312af658b6153dff Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 22:23:26 +0000 Subject: [PATCH 13/24] Make the extension auto-loading mechanism work with the __stdcall calling convention. Also, fix a couple Tcl command calling conventions missed in the previous check-in. FossilOrigin-Name: 3ea567c4b07b2a7a027b9b5cb8250ab687803698 --- Makefile.msc | 11 +++++++++++ ext/misc/vfsstat.c | 2 +- manifest | 30 +++++++++++++++--------------- manifest.uuid | 2 +- src/loadext.c | 44 ++++++++++++++++++++++++++++++-------------- src/sqlite.h.in | 8 ++++++-- src/sqlite3ext.h | 14 ++++++++++++-- src/tclsqlite.c | 20 +++++++++++++++++--- src/test_autoext.c | 12 ++++++------ src/test_func.c | 18 +++++++++++------- src/test_multiplex.c | 2 +- src/test_thread.c | 4 ++-- 12 files changed, 113 insertions(+), 54 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index b4cb94a5b8..527efd8f7d 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -24,6 +24,13 @@ USE_AMALGAMATION = 1 USE_FULLWARN = 0 !ENDIF +# Set this non-0 to enable full runtime error checks (-RTC1, etc). This +# has no effect if (any) optimizations are enabled. +# +!IFNDEF USE_RUNTIME_CHECKS +USE_RUNTIME_CHECKS = 0 +!ENDIF + # Set this non-0 to use "stdcall" calling convention for the core library # and shell executable. # @@ -847,6 +854,10 @@ RCC = $(RCC) -D_DEBUG !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0 TCC = $(TCC) -Od BCC = $(BCC) -Od +!IF $(USE_RUNTIME_CHECKS)!=0 +TCC = $(TCC) -RTC1 +BCC = $(BCC) -RTC1 +!ENDIF !ELSEIF $(OPTIMIZATIONS)>=3 TCC = $(TCC) -Ox BCC = $(BCC) -Ox diff --git a/ext/misc/vfsstat.c b/ext/misc/vfsstat.c index af088d6655..14753d277d 100644 --- a/ext/misc/vfsstat.c +++ b/ext/misc/vfsstat.c @@ -809,7 +809,7 @@ int sqlite3_vfsstat_init( vstat_vfs.base.szOsFile = sizeof(VStatFile) + vstat_vfs.pVfs->szOsFile; rc = sqlite3_vfs_register(&vstat_vfs.base, 1); if( rc==SQLITE_OK ){ - rc = sqlite3_auto_extension((void(*)(void))vstatRegister); + rc = sqlite3_auto_extension(vstatRegister); } if( rc==SQLITE_OK ) rc = SQLITE_OK_LOAD_PERMANENTLY; return rc; diff --git a/manifest b/manifest index 4df76977b0..36d529bb7a 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -C The\s'sqlite3ext.h'\scontent\sshould\sbe\sprocessed\sbefore\sbeing\sincluded\sin\sthe\samalgamation. -D 2016-07-28T19:28:35.475 +C Make\sthe\sextension\sauto-loading\smechanism\swork\swith\sthe\s__stdcall\scalling\sconvention.\s\sAlso,\sfix\sa\scouple\sTcl\scommand\scalling\sconventions\smissed\sin\sthe\sprevious\scheck-in. +D 2016-07-28T22:23:26.522 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 -F Makefile.msc eefec7a26bf73bb04f2241058e23a3ec8a43f656 +F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -223,7 +223,7 @@ F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52 F ext/misc/spellfix.c a4723b6aff748a417b5091b68a46443265c40f0d F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95 -F ext/misc/vfsstat.c 6110aeeaab2f1df17a923c8a8acef3c74f6dc515 +F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178 F ext/misc/vtshim.c babb0dc2bf116029e3e7c9a618b8a1377045303e F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212 F ext/rbu/rbu.c b2c0b5e6ae1a89affc0edfc127ebfa5f637a0ce4 @@ -347,7 +347,7 @@ F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4 F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da F src/insert.c 8f4e9fcbd8e95e85f15647ba8b413b18d556ec2b F src/legacy.c 75d3023be8f0d2b99d60f905090341a03358c58e -F src/loadext.c 5dd8b5a67d32a98bb75657c2a9e48b2cedbf13a4 +F src/loadext.c 4e26039f8d2e91acd57e55fcc31477aa37a3aa80 F src/main.c 16c1b2114eae8804caf3a8de8cb47bf2c6d83ad3 F src/malloc.c 1443d1ad95d67c21d77af7ae3f44678252f0efec F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 @@ -385,14 +385,14 @@ F src/resolve.c cca3aa77b95706df5d635a2141a4d1de60ae6598 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c f3c6e9065fb34f6a23af27ec7f1f717ffbfc2ee4 F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5 -F src/sqlite.h.in a03063e698a43cc5c996cd341f39439a6ce58304 +F src/sqlite.h.in 856ab22cfcec0ba94d2f0139a72a9797343687b3 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 -F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9 +F src/sqlite3ext.h 978c062d3fa59a22c6d57305b9f290e3a26110c3 F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052 F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9 -F src/tclsqlite.c 342379845d52c62a778c76c3dd0a2695af723e04 +F src/tclsqlite.c 2ca362fa9c9762f705169aa5b2e75d688f4391f7 F src/test1.c 906a04b649c7139e943193a3905d583e325c30c7 F src/test2.c b7174313e993754303a8b33c43df7c44b46857ab F src/test3.c 1339a40be39650ae83894b6578f971dc7f96ea8a @@ -403,7 +403,7 @@ F src/test7.c 5612e9aecf934d6df7bba6ce861fdf5ba5456010 F src/test8.c 4f4904721167b32f7a4fa8c7b32a07a673d6cc86 F src/test9.c 12e5ba554d2d1cbe0158f6ab3f7ffcd7a86ee4e5 F src/test_async.c 195ab49da082053fdb0f949c114b806a49ca770a -F src/test_autoext.c 6c8fe00caa3f38396f0990467179e9d1adb39ddd +F src/test_autoext.c cc69375c006b7bac6094ec602f52525350fd5229 F src/test_backup.c bf5da90c9926df0a4b941f2d92825a01bbe090a0 F src/test_bestindex.c d23f80d334c59662af69191854c76b8d3d0c8c96 F src/test_blob.c a0f7ad49a0c9d4b72f693fe2a71c58d7e507174d @@ -412,7 +412,7 @@ F src/test_config.c 4d3d4a886416f369771d69a6dba926866deda788 F src/test_demovfs.c a0c3bdd45ed044115c2c9f7779e56eafff18741e F src/test_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58 F src/test_fs.c ac62ce7d5c0c23aa6932891cad5746945564c91c -F src/test_func.c 9cea6fee7ece5f46aa26e060b35e10dc6ba708cf +F src/test_func.c 7dceef0e0556933a751af9b73478519b6dc12f0f F src/test_hexio.c 1d4469ca61ab202a1fcec6543f584d2407205e8d F src/test_init.c 4413c211a94b62157ca4c145b3f27c497f03c664 F src/test_intarray.c 988fc61cb0ff539f4172c0d95f15287c92516f64 @@ -420,7 +420,7 @@ F src/test_intarray.h f3b7672f5d1056eac563c0d6ea8480a660b1475c F src/test_journal.c d3b83f2bcb7792c709e57abddc456a2b1818643a F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd F src/test_malloc.c c05f6c40bd6c8bfe5f1718212f81fd5687f91766 -F src/test_multiplex.c af2792ec4436d442d1bd00b8803470a25111bad3 +F src/test_multiplex.c 371d3874fd6365f18468d1c131e153e5c9abe95e F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635 F src/test_mutex.c 7f4337ba23ee6b1d2ec81c189653608cb069926a F src/test_onefile.c 416f87a28d6d673352d33fc4b1c7d39db878e50f @@ -435,7 +435,7 @@ F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b F src/test_superlock.c 4839644b9201da822f181c5bc406c0b2385f672e F src/test_syscall.c 1073306ba2e9bfc886771871a13d3de281ed3939 F src/test_tclvar.c df9fe1213c2634687a9ca0b0bec0d2119d359ae3 -F src/test_thread.c c7c40494b7a0603ebb6eb97c904545c0dceca5ff +F src/test_thread.c a122592c2b857c79eb4ee4bacb62a5a6c8fe4c6f F src/test_vfs.c f0186261a24de2671d080bcd8050732f0cb64f6e F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698 F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P fd784887e125bf95f4799ad09cbcba6795173487 -R 159053f8c66afb3fed693021893388d2 +P cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1 +R bda25e48e90849454c6e864127930d74 U mistachkin -Z 1fc3620b6fdad23d7ecfea7d673497bf +Z 008c4b78efecf8010a475c91e6246b39 diff --git a/manifest.uuid b/manifest.uuid index ad3e416aac..0a08bdb4e1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1 \ No newline at end of file +3ea567c4b07b2a7a027b9b5cb8250ab687803698 \ No newline at end of file diff --git a/src/loadext.c b/src/loadext.c index ce1f5317c6..525272d7fe 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -21,6 +21,14 @@ #include #ifndef SQLITE_OMIT_LOAD_EXTENSION +/* +** This is the function signature used for all extension entry points. +*/ +typedef int (*sqlite3_loadext_entry)( + sqlite3 *db, /* Handle to the database. */ + char **pzErrMsg, /* Used to set error string on failure. */ + const sqlite3_api_routines *pThunk /* Extension API function pointers. */ +); /* ** Some API routines are omitted when various features are @@ -111,6 +119,10 @@ #define sqlite3_blob_reopen 0 #endif +#if defined(SQLITE_OMIT_TRACE) +# define sqlite3_trace_v2 0 +#endif + /* ** The following structure contains pointers to all SQLite API routines. ** A pointer to this structure is passed into extensions when they are @@ -416,7 +428,10 @@ static const sqlite3_api_routines sqlite3Apis = { sqlite3_strlike, sqlite3_db_cacheflush, /* Version 3.12.0 and later */ - sqlite3_system_errno + sqlite3_system_errno, + /* Version 3.14.0 and later */ + sqlite3_trace_v2, + sqlite3_expanded_sql }; /* @@ -439,7 +454,7 @@ static int sqlite3LoadExtension( ){ sqlite3_vfs *pVfs = db->pVfs; void *handle; - int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*); + sqlite3_loadext_entry xInit; char *zErrmsg = 0; const char *zEntry; char *zAltEntry = 0; @@ -498,8 +513,7 @@ static int sqlite3LoadExtension( } return SQLITE_ERROR; } - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) - sqlite3OsDlSym(pVfs, handle, zEntry); + xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry); /* If no entry point was specified and the default legacy ** entry point name "sqlite3_extension_init" was not found, then @@ -531,8 +545,7 @@ static int sqlite3LoadExtension( } memcpy(zAltEntry+iEntry, "_init", 6); zEntry = zAltEntry; - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) - sqlite3OsDlSym(pVfs, handle, zEntry); + xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry); } if( xInit==0 ){ if( pzErrMsg ){ @@ -662,7 +675,9 @@ static SQLITE_WSD struct sqlite3AutoExtList { ** Register a statically linked extension that is automatically ** loaded by every new database connection. */ -int sqlite3_auto_extension(void (*xInit)(void)){ +int sqlite3_auto_extension( + void (*xInit)(sqlite3 *, char **, const void *) /* Extension entry point */ +){ int rc = SQLITE_OK; #ifndef SQLITE_OMIT_AUTOINIT rc = sqlite3_initialize(); @@ -678,7 +693,7 @@ int sqlite3_auto_extension(void (*xInit)(void)){ wsdAutoextInit; sqlite3_mutex_enter(mutex); for(i=0; i=0; i--){ - if( wsdAutoext.aExt[i]==xInit ){ + if( wsdAutoext.aExt[i]==(void*)xInit ){ wsdAutoext.nExt--; wsdAutoext.aExt[i] = wsdAutoext.aExt[wsdAutoext.nExt]; n++; @@ -756,7 +773,7 @@ void sqlite3AutoLoadExtensions(sqlite3 *db){ u32 i; int go = 1; int rc; - int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*); + sqlite3_loadext_entry xInit; wsdAutoextInit; if( wsdAutoext.nExt==0 ){ @@ -773,8 +790,7 @@ void sqlite3AutoLoadExtensions(sqlite3 *db){ xInit = 0; go = 0; }else{ - xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*)) - wsdAutoext.aExt[i]; + xInit = (sqlite3_loadext_entry)wsdAutoext.aExt[i]; } sqlite3_mutex_leave(mutex); zErrmsg = 0; diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 02ae22c346..104e465467 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -5707,7 +5707,9 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** See also: [sqlite3_reset_auto_extension()] ** and [sqlite3_cancel_auto_extension()] */ -int sqlite3_auto_extension(void (*xEntryPoint)(void)); +int sqlite3_auto_extension( + void (*xEntryPoint)(sqlite3 *, char **, const void *) +); /* ** CAPI3REF: Cancel Automatic Extension Loading @@ -5719,7 +5721,9 @@ int sqlite3_auto_extension(void (*xEntryPoint)(void)); ** unregistered and it returns 0 if X was not on the list of initialization ** routines. */ -int sqlite3_cancel_auto_extension(void (*xEntryPoint)(void)); +int sqlite3_cancel_auto_extension( + void (*xEntryPoint)(sqlite3 *, char **, const void *) +); /* ** CAPI3REF: Reset Automatic Extension Loading diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index 338e1becd5..d79ca826de 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -251,12 +251,12 @@ struct sqlite3_api_routines { char *(*vsnprintf)(int,char*,const char*,va_list); int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*); /* Version 3.8.7 and later */ - int (*auto_extension)(void(*)(void)); + int (*auto_extension)(void(*)(sqlite3*,char**,const void*)); int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64, void(*)(void*)); int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64, void(*)(void*),unsigned char); - int (*cancel_auto_extension)(void(*)(void)); + int (*cancel_auto_extension)(void(*)(sqlite3*,char**,const void*)); int (*load_extension)(sqlite3*,const char*,const char*,char**); void *(*malloc64)(sqlite3_uint64); sqlite3_uint64 (*msize)(void*); @@ -286,6 +286,16 @@ struct sqlite3_api_routines { char *(*expanded_sql)(sqlite3_stmt*); }; +/* +** This is the function signature used for all extension entry points. It +** is also defined in the file "loadext.c". +*/ +typedef int (*sqlite3_loadext_entry)( + sqlite3 *db, /* Handle to the database. */ + char **pzErrMsg, /* Used to set error string on failure. */ + const sqlite3_api_routines *pThunk /* Extension API function pointers. */ +); + /* ** The following macros redefine the API routines so that they are ** redirected through the global sqlite3_api structure. diff --git a/src/tclsqlite.c b/src/tclsqlite.c index bc94a5ff7f..dd4e42e8a9 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -3806,7 +3806,12 @@ static void MD5DigestToBase10x8(unsigned char digest[16], char zDigest[50]){ ** A TCL command for md5. The argument is the text to be hashed. The ** Result is the hash in base64. */ -static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){ +static int SQLITE_TCLAPI md5_cmd( + void*cd, + Tcl_Interp *interp, + int argc, + const char **argv +){ MD5Context ctx; unsigned char digest[16]; char zBuf[50]; @@ -3830,7 +3835,12 @@ static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){ ** A TCL command to take the md5 hash of a file. The argument is the ** name of the file. */ -static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){ +static int SQLITE_TCLAPI md5file_cmd( + void*cd, + Tcl_Interp *interp, + int argc, + const char **argv +){ FILE *in; MD5Context ctx; void (*converter)(unsigned char*, char*); @@ -3910,7 +3920,11 @@ static void md5finalize(sqlite3_context *context){ MD5DigestToBase16(digest, zBuf); sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT); } -int Md5_Register(sqlite3 *db){ +int Md5_Register( + sqlite3 *db, + char **pzErrMsg, + const void *pThunk +){ int rc = sqlite3_create_function(db, "md5sum", -1, SQLITE_UTF8, 0, 0, md5step, md5finalize); sqlite3_overload_function(db, "md5sum", -1); /* To exercise this API */ diff --git a/src/test_autoext.c b/src/test_autoext.c index 94a3223e65..f962a51d6b 100644 --- a/src/test_autoext.c +++ b/src/test_autoext.c @@ -100,7 +100,7 @@ static int SQLITE_TCLAPI autoExtSqrObjCmd( int objc, Tcl_Obj *CONST objv[] ){ - int rc = sqlite3_auto_extension((void*)sqr_init); + int rc = sqlite3_auto_extension(sqr_init); Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); return SQLITE_OK; } @@ -116,7 +116,7 @@ static int SQLITE_TCLAPI cancelAutoExtSqrObjCmd( int objc, Tcl_Obj *CONST objv[] ){ - int rc = sqlite3_cancel_auto_extension((void*)sqr_init); + int rc = sqlite3_cancel_auto_extension(sqr_init); Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); return SQLITE_OK; } @@ -132,7 +132,7 @@ static int SQLITE_TCLAPI autoExtCubeObjCmd( int objc, Tcl_Obj *CONST objv[] ){ - int rc = sqlite3_auto_extension((void*)cube_init); + int rc = sqlite3_auto_extension(cube_init); Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); return SQLITE_OK; } @@ -148,7 +148,7 @@ static int SQLITE_TCLAPI cancelAutoExtCubeObjCmd( int objc, Tcl_Obj *CONST objv[] ){ - int rc = sqlite3_cancel_auto_extension((void*)cube_init); + int rc = sqlite3_cancel_auto_extension(cube_init); Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); return SQLITE_OK; } @@ -164,7 +164,7 @@ static int SQLITE_TCLAPI autoExtBrokenObjCmd( int objc, Tcl_Obj *CONST objv[] ){ - int rc = sqlite3_auto_extension((void*)broken_init); + int rc = sqlite3_auto_extension(broken_init); Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); return SQLITE_OK; } @@ -180,7 +180,7 @@ static int SQLITE_TCLAPI cancelAutoExtBrokenObjCmd( int objc, Tcl_Obj *CONST objv[] ){ - int rc = sqlite3_cancel_auto_extension((void*)broken_init); + int rc = sqlite3_cancel_auto_extension(broken_init); Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); return SQLITE_OK; } diff --git a/src/test_func.c b/src/test_func.c index 6a714ef3eb..fff1990128 100644 --- a/src/test_func.c +++ b/src/test_func.c @@ -644,7 +644,11 @@ static void test_setsubtype( sqlite3_result_subtype(context, (unsigned int)sqlite3_value_int(argv[1])); } -static int registerTestFunctions(sqlite3 *db){ +static int registerTestFunctions( + sqlite3 *db, + char **pzErrMsg, + const void *pThunk +){ static const struct { char *zName; signed char nArg; @@ -699,10 +703,10 @@ static int SQLITE_TCLAPI autoinstall_test_funcs( int objc, Tcl_Obj *CONST objv[] ){ - extern int Md5_Register(sqlite3*); - int rc = sqlite3_auto_extension((void*)registerTestFunctions); + extern int Md5_Register(sqlite3 *, char **, const void *); + int rc = sqlite3_auto_extension(registerTestFunctions); if( rc==SQLITE_OK ){ - rc = sqlite3_auto_extension((void*)Md5_Register); + rc = sqlite3_auto_extension(Md5_Register); } Tcl_SetObjResult(interp, Tcl_NewIntObj(rc)); return TCL_OK; @@ -799,13 +803,13 @@ int Sqlitetest_func_Init(Tcl_Interp *interp){ { "abuse_create_function", abuse_create_function }, }; int i; - extern int Md5_Register(sqlite3*); + extern int Md5_Register(sqlite3 *, char **, const void *); for(i=0; i Date: Thu, 28 Jul 2016 22:38:31 +0000 Subject: [PATCH 14/24] Make sure all the auto-extension mechanism function signatures match up precisely. FossilOrigin-Name: 87ba69b5ca4a8e4ef2bbaaf07a0ff13fc5cd4721 --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- src/loadext.c | 4 ++-- src/sqlite.h.in | 5 +++-- src/sqlite3ext.h | 5 +++-- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/manifest b/manifest index 36d529bb7a..0fd8b5e7cf 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Make\sthe\sextension\sauto-loading\smechanism\swork\swith\sthe\s__stdcall\scalling\sconvention.\s\sAlso,\sfix\sa\scouple\sTcl\scommand\scalling\sconventions\smissed\sin\sthe\sprevious\scheck-in. -D 2016-07-28T22:23:26.522 +C Make\ssure\sall\sthe\sauto-extension\smechanism\sfunction\ssignatures\smatch\sup\sprecisely. +D 2016-07-28T22:38:31.788 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -347,7 +347,7 @@ F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4 F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da F src/insert.c 8f4e9fcbd8e95e85f15647ba8b413b18d556ec2b F src/legacy.c 75d3023be8f0d2b99d60f905090341a03358c58e -F src/loadext.c 4e26039f8d2e91acd57e55fcc31477aa37a3aa80 +F src/loadext.c 74a66e96c9b6beafbbc345d9045727e2bd7fd483 F src/main.c 16c1b2114eae8804caf3a8de8cb47bf2c6d83ad3 F src/malloc.c 1443d1ad95d67c21d77af7ae3f44678252f0efec F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 @@ -385,9 +385,9 @@ F src/resolve.c cca3aa77b95706df5d635a2141a4d1de60ae6598 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c f3c6e9065fb34f6a23af27ec7f1f717ffbfc2ee4 F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5 -F src/sqlite.h.in 856ab22cfcec0ba94d2f0139a72a9797343687b3 +F src/sqlite.h.in acd078b5b18d7ceecd9f2bbffc30109a758a73b0 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 -F src/sqlite3ext.h 978c062d3fa59a22c6d57305b9f290e3a26110c3 +F src/sqlite3ext.h ebbcfcc6200d04f04b4e2252327b14c50cd9d49a F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052 F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1 -R bda25e48e90849454c6e864127930d74 +P 3ea567c4b07b2a7a027b9b5cb8250ab687803698 +R 51ed71c50a5a0dd10fef4650340d6be2 U mistachkin -Z 008c4b78efecf8010a475c91e6246b39 +Z 81fd56db162c30680657ddae99c1b31b diff --git a/manifest.uuid b/manifest.uuid index 0a08bdb4e1..428fb337c6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3ea567c4b07b2a7a027b9b5cb8250ab687803698 \ No newline at end of file +87ba69b5ca4a8e4ef2bbaaf07a0ff13fc5cd4721 \ No newline at end of file diff --git a/src/loadext.c b/src/loadext.c index 525272d7fe..c3d91eed33 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -676,7 +676,7 @@ static SQLITE_WSD struct sqlite3AutoExtList { ** loaded by every new database connection. */ int sqlite3_auto_extension( - void (*xInit)(sqlite3 *, char **, const void *) /* Extension entry point */ + void (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) ){ int rc = SQLITE_OK; #ifndef SQLITE_OMIT_AUTOINIT @@ -723,7 +723,7 @@ int sqlite3_auto_extension( ** was not on the list. */ int sqlite3_cancel_auto_extension( - void (*xInit)(sqlite3 *, char **, const void *) /* Extension entry point */ + void (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) ){ #if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 104e465467..9fec987d8c 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -5707,8 +5707,9 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** See also: [sqlite3_reset_auto_extension()] ** and [sqlite3_cancel_auto_extension()] */ +typedef struct sqlite3_api_routines sqlite3_api_routines; int sqlite3_auto_extension( - void (*xEntryPoint)(sqlite3 *, char **, const void *) + void (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) ); /* @@ -5722,7 +5723,7 @@ int sqlite3_auto_extension( ** routines. */ int sqlite3_cancel_auto_extension( - void (*xEntryPoint)(sqlite3 *, char **, const void *) + void (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) ); /* diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index d79ca826de..8ee8e2d576 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -251,12 +251,13 @@ struct sqlite3_api_routines { char *(*vsnprintf)(int,char*,const char*,va_list); int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*); /* Version 3.8.7 and later */ - int (*auto_extension)(void(*)(sqlite3*,char**,const void*)); + int (*auto_extension)(void(*)(sqlite3*,char**,const sqlite3_api_routines*)); int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64, void(*)(void*)); int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64, void(*)(void*),unsigned char); - int (*cancel_auto_extension)(void(*)(sqlite3*,char**,const void*)); + int (*cancel_auto_extension)(void(*)(sqlite3*,char**, + const sqlite3_api_routines*)); int (*load_extension)(sqlite3*,const char*,const char*,char**); void *(*malloc64)(sqlite3_uint64); sqlite3_uint64 (*msize)(void*); From 78d5e02f99c1e555212da6e8699eead360cf314c Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 22:46:53 +0000 Subject: [PATCH 15/24] The return type used by the auto-extension entry points is 'int', not 'void'. FossilOrigin-Name: bf9c86c74f30136a106f37603a6c7dcc76caf41d --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- src/loadext.c | 4 ++-- src/sqlite.h.in | 4 ++-- src/sqlite3ext.h | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/manifest b/manifest index 0fd8b5e7cf..17a1dd2ca9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Make\ssure\sall\sthe\sauto-extension\smechanism\sfunction\ssignatures\smatch\sup\sprecisely. -D 2016-07-28T22:38:31.788 +C The\sreturn\stype\sused\sby\sthe\sauto-extension\sentry\spoints\sis\s'int',\snot\s'void'. +D 2016-07-28T22:46:53.241 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -347,7 +347,7 @@ F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4 F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da F src/insert.c 8f4e9fcbd8e95e85f15647ba8b413b18d556ec2b F src/legacy.c 75d3023be8f0d2b99d60f905090341a03358c58e -F src/loadext.c 74a66e96c9b6beafbbc345d9045727e2bd7fd483 +F src/loadext.c c3c2a37e4ce940d17c73971738754d412c79e09d F src/main.c 16c1b2114eae8804caf3a8de8cb47bf2c6d83ad3 F src/malloc.c 1443d1ad95d67c21d77af7ae3f44678252f0efec F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 @@ -385,9 +385,9 @@ F src/resolve.c cca3aa77b95706df5d635a2141a4d1de60ae6598 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c f3c6e9065fb34f6a23af27ec7f1f717ffbfc2ee4 F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5 -F src/sqlite.h.in acd078b5b18d7ceecd9f2bbffc30109a758a73b0 +F src/sqlite.h.in cd10e4206b91c4bf03f121ab9209a14af0b48f14 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 -F src/sqlite3ext.h ebbcfcc6200d04f04b4e2252327b14c50cd9d49a +F src/sqlite3ext.h f4206565eb5f5cef9a1544d32a076b5f47af1bdc F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052 F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 3ea567c4b07b2a7a027b9b5cb8250ab687803698 -R 51ed71c50a5a0dd10fef4650340d6be2 +P 87ba69b5ca4a8e4ef2bbaaf07a0ff13fc5cd4721 +R fe55b3414e54e3c3fe825e99e626bb4c U mistachkin -Z 81fd56db162c30680657ddae99c1b31b +Z 6282b6a783a4676d4515222e105ea01c diff --git a/manifest.uuid b/manifest.uuid index 428fb337c6..b5a2549c02 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -87ba69b5ca4a8e4ef2bbaaf07a0ff13fc5cd4721 \ No newline at end of file +bf9c86c74f30136a106f37603a6c7dcc76caf41d \ No newline at end of file diff --git a/src/loadext.c b/src/loadext.c index c3d91eed33..163141bf73 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -676,7 +676,7 @@ static SQLITE_WSD struct sqlite3AutoExtList { ** loaded by every new database connection. */ int sqlite3_auto_extension( - void (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) + int (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) ){ int rc = SQLITE_OK; #ifndef SQLITE_OMIT_AUTOINIT @@ -723,7 +723,7 @@ int sqlite3_auto_extension( ** was not on the list. */ int sqlite3_cancel_auto_extension( - void (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) + int (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *) ){ #if SQLITE_THREADSAFE sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 9fec987d8c..9d28cdc05a 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -5709,7 +5709,7 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff); */ typedef struct sqlite3_api_routines sqlite3_api_routines; int sqlite3_auto_extension( - void (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) + int (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) ); /* @@ -5723,7 +5723,7 @@ int sqlite3_auto_extension( ** routines. */ int sqlite3_cancel_auto_extension( - void (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) + int (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *) ); /* diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index 8ee8e2d576..689a5c4856 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -251,12 +251,12 @@ struct sqlite3_api_routines { char *(*vsnprintf)(int,char*,const char*,va_list); int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*); /* Version 3.8.7 and later */ - int (*auto_extension)(void(*)(sqlite3*,char**,const sqlite3_api_routines*)); + int (*auto_extension)(int(*)(sqlite3*,char**,const sqlite3_api_routines*)); int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64, void(*)(void*)); int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64, void(*)(void*),unsigned char); - int (*cancel_auto_extension)(void(*)(sqlite3*,char**, + int (*cancel_auto_extension)(int(*)(sqlite3*,char**, const sqlite3_api_routines*)); int (*load_extension)(sqlite3*,const char*,const char*,char**); void *(*malloc64)(sqlite3_uint64); From 85bd982ba02750aa927c2b80e5d7f888d58fb2fb Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 22:53:10 +0000 Subject: [PATCH 16/24] More compiler warning fixes for GCC related to the auto-extension mechanism. FossilOrigin-Name: b8218129bc848c61fa6910feae4141dac6ad86fc --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- src/tclsqlite.c | 2 +- src/test_func.c | 6 +++--- src/test_thread.c | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/manifest b/manifest index 17a1dd2ca9..07a36a9f51 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C The\sreturn\stype\sused\sby\sthe\sauto-extension\sentry\spoints\sis\s'int',\snot\s'void'. -D 2016-07-28T22:46:53.241 +C More\scompiler\swarning\sfixes\sfor\sGCC\srelated\sto\sthe\sauto-extension\smechanism. +D 2016-07-28T22:53:10.716 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -392,7 +392,7 @@ F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052 F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9 -F src/tclsqlite.c 2ca362fa9c9762f705169aa5b2e75d688f4391f7 +F src/tclsqlite.c bdae822f21e229b6daced15938b6343ce44ef454 F src/test1.c 906a04b649c7139e943193a3905d583e325c30c7 F src/test2.c b7174313e993754303a8b33c43df7c44b46857ab F src/test3.c 1339a40be39650ae83894b6578f971dc7f96ea8a @@ -412,7 +412,7 @@ F src/test_config.c 4d3d4a886416f369771d69a6dba926866deda788 F src/test_demovfs.c a0c3bdd45ed044115c2c9f7779e56eafff18741e F src/test_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58 F src/test_fs.c ac62ce7d5c0c23aa6932891cad5746945564c91c -F src/test_func.c 7dceef0e0556933a751af9b73478519b6dc12f0f +F src/test_func.c 6f34b19ae097e3cf0b0fe5d6904cb9900e67f2ff F src/test_hexio.c 1d4469ca61ab202a1fcec6543f584d2407205e8d F src/test_init.c 4413c211a94b62157ca4c145b3f27c497f03c664 F src/test_intarray.c 988fc61cb0ff539f4172c0d95f15287c92516f64 @@ -435,7 +435,7 @@ F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b F src/test_superlock.c 4839644b9201da822f181c5bc406c0b2385f672e F src/test_syscall.c 1073306ba2e9bfc886771871a13d3de281ed3939 F src/test_tclvar.c df9fe1213c2634687a9ca0b0bec0d2119d359ae3 -F src/test_thread.c a122592c2b857c79eb4ee4bacb62a5a6c8fe4c6f +F src/test_thread.c 89f0e47dac64e7ab15ca0a4fc87e0882c495ae21 F src/test_vfs.c f0186261a24de2671d080bcd8050732f0cb64f6e F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698 F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 87ba69b5ca4a8e4ef2bbaaf07a0ff13fc5cd4721 -R fe55b3414e54e3c3fe825e99e626bb4c +P bf9c86c74f30136a106f37603a6c7dcc76caf41d +R 664c66de93f8212f17433a2724631f1d U mistachkin -Z 6282b6a783a4676d4515222e105ea01c +Z 34c982f036e48065c3f321d45916961b diff --git a/manifest.uuid b/manifest.uuid index b5a2549c02..2806d535ae 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -bf9c86c74f30136a106f37603a6c7dcc76caf41d \ No newline at end of file +b8218129bc848c61fa6910feae4141dac6ad86fc \ No newline at end of file diff --git a/src/tclsqlite.c b/src/tclsqlite.c index dd4e42e8a9..3db4a32c4d 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -3923,7 +3923,7 @@ static void md5finalize(sqlite3_context *context){ int Md5_Register( sqlite3 *db, char **pzErrMsg, - const void *pThunk + const sqlite3_api_routines *pThunk ){ int rc = sqlite3_create_function(db, "md5sum", -1, SQLITE_UTF8, 0, 0, md5step, md5finalize); diff --git a/src/test_func.c b/src/test_func.c index fff1990128..6bfa862464 100644 --- a/src/test_func.c +++ b/src/test_func.c @@ -647,7 +647,7 @@ static void test_setsubtype( static int registerTestFunctions( sqlite3 *db, char **pzErrMsg, - const void *pThunk + const sqlite3_api_routines *pThunk ){ static const struct { char *zName; @@ -703,7 +703,7 @@ static int SQLITE_TCLAPI autoinstall_test_funcs( int objc, Tcl_Obj *CONST objv[] ){ - extern int Md5_Register(sqlite3 *, char **, const void *); + extern int Md5_Register(sqlite3 *, char **, const sqlite3_api_routines *); int rc = sqlite3_auto_extension(registerTestFunctions); if( rc==SQLITE_OK ){ rc = sqlite3_auto_extension(Md5_Register); @@ -803,7 +803,7 @@ int Sqlitetest_func_Init(Tcl_Interp *interp){ { "abuse_create_function", abuse_create_function }, }; int i; - extern int Md5_Register(sqlite3 *, char **, const void *); + extern int Md5_Register(sqlite3 *, char **, const sqlite3_api_routines *); for(i=0; i Date: Thu, 28 Jul 2016 23:54:45 +0000 Subject: [PATCH 17/24] Use the SQLITE_TCLAPI macro in several extensions that were missed in the previous check-in. FossilOrigin-Name: df2543652b835353c03956dfbd3e35e5b191372e --- ext/fts5/fts5_tcl.c | 20 ++++++++++---------- ext/rbu/test_rbu.c | 12 ++++++------ ext/session/test_session.c | 14 +++++++------- manifest | 16 ++++++++-------- manifest.uuid | 2 +- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/ext/fts5/fts5_tcl.c b/ext/fts5/fts5_tcl.c index dee9bc7f18..9a7077b61d 100644 --- a/ext/fts5/fts5_tcl.c +++ b/ext/fts5/fts5_tcl.c @@ -82,7 +82,7 @@ static int f5tResultToErrorCode(const char *zRes){ return SQLITE_ERROR; } -static int f5tDbAndApi( +static int SQLITE_TCLAPI f5tDbAndApi( Tcl_Interp *interp, Tcl_Obj *pObj, sqlite3 **ppDb, @@ -213,7 +213,7 @@ static void xSetAuxdataDestructor(void *p){ ** ** Description... */ -static int xF5tApi( +static int SQLITE_TCLAPI xF5tApi( void * clientData, Tcl_Interp *interp, int objc, @@ -606,7 +606,7 @@ static void xF5tDestroy(void *pCtx){ ** ** Description... */ -static int f5tCreateFunction( +static int SQLITE_TCLAPI f5tCreateFunction( void * clientData, Tcl_Interp *interp, int objc, @@ -676,7 +676,7 @@ static int xTokenizeCb2( ** ** Description... */ -static int f5tTokenize( +static int SQLITE_TCLAPI f5tTokenize( void * clientData, Tcl_Interp *interp, int objc, @@ -882,7 +882,7 @@ static int f5tTokenizerTokenize( /* ** sqlite3_fts5_token ?-colocated? TEXT START END */ -static int f5tTokenizerReturn( +static int SQLITE_TCLAPI f5tTokenizerReturn( void * clientData, Tcl_Interp *interp, int objc, @@ -953,7 +953,7 @@ static void f5tDelTokenizer(void *pCtx){ ** SCRIPT2 should invoke the [sqlite3_fts5_token] command once for each ** token within the tokenized text. */ -static int f5tCreateTokenizer( +static int SQLITE_TCLAPI f5tCreateTokenizer( ClientData clientData, Tcl_Interp *interp, int objc, @@ -1005,7 +1005,7 @@ static void xF5tFree(ClientData clientData){ ** ** Set or clear the global "may-be-corrupt" flag. Return the old value. */ -static int f5tMayBeCorrupt( +static int SQLITE_TCLAPI f5tMayBeCorrupt( void * clientData, Tcl_Interp *interp, int objc, @@ -1037,7 +1037,7 @@ static unsigned int f5t_fts5HashKey(int nSlot, const char *p, int n){ return (h % nSlot); } -static int f5tTokenHash( +static int SQLITE_TCLAPI f5tTokenHash( void * clientData, Tcl_Interp *interp, int objc, @@ -1062,7 +1062,7 @@ static int f5tTokenHash( return TCL_OK; } -static int f5tRegisterMatchinfo( +static int SQLITE_TCLAPI f5tRegisterMatchinfo( void * clientData, Tcl_Interp *interp, int objc, @@ -1087,7 +1087,7 @@ static int f5tRegisterMatchinfo( return TCL_OK; } -static int f5tRegisterTok( +static int SQLITE_TCLAPI f5tRegisterTok( void * clientData, Tcl_Interp *interp, int objc, diff --git a/ext/rbu/test_rbu.c b/ext/rbu/test_rbu.c index 671f16c553..548954d7f1 100644 --- a/ext/rbu/test_rbu.c +++ b/ext/rbu/test_rbu.c @@ -53,7 +53,7 @@ void test_rbu_delta(sqlite3_context *pCtx, int nArg, sqlite3_value **apVal){ } -static int test_sqlite3rbu_cmd( +static int SQLITE_TCLAPI test_sqlite3rbu_cmd( ClientData clientData, Tcl_Interp *interp, int objc, @@ -196,7 +196,7 @@ static int test_sqlite3rbu_cmd( /* ** Tclcmd: sqlite3rbu CMD ?? */ -static int test_sqlite3rbu( +static int SQLITE_TCLAPI test_sqlite3rbu( ClientData clientData, Tcl_Interp *interp, int objc, @@ -226,7 +226,7 @@ static int test_sqlite3rbu( /* ** Tclcmd: sqlite3rbu_vacuum CMD */ -static int test_sqlite3rbu_vacuum( +static int SQLITE_TCLAPI test_sqlite3rbu_vacuum( ClientData clientData, Tcl_Interp *interp, int objc, @@ -254,7 +254,7 @@ static int test_sqlite3rbu_vacuum( /* ** Tclcmd: sqlite3rbu_create_vfs ?-default? NAME PARENT */ -static int test_sqlite3rbu_create_vfs( +static int SQLITE_TCLAPI test_sqlite3rbu_create_vfs( ClientData clientData, Tcl_Interp *interp, int objc, @@ -289,7 +289,7 @@ static int test_sqlite3rbu_create_vfs( /* ** Tclcmd: sqlite3rbu_destroy_vfs NAME */ -static int test_sqlite3rbu_destroy_vfs( +static int SQLITE_TCLAPI test_sqlite3rbu_destroy_vfs( ClientData clientData, Tcl_Interp *interp, int objc, @@ -310,7 +310,7 @@ static int test_sqlite3rbu_destroy_vfs( /* ** Tclcmd: sqlite3rbu_internal_test */ -static int test_sqlite3rbu_internal_test( +static int SQLITE_TCLAPI test_sqlite3rbu_internal_test( ClientData clientData, Tcl_Interp *interp, int objc, diff --git a/ext/session/test_session.c b/ext/session/test_session.c index 9f6bc3f70d..b273565455 100644 --- a/ext/session/test_session.c +++ b/ext/session/test_session.c @@ -111,7 +111,7 @@ static int testStreamOutput( ** $session patchset ** $session table_filter SCRIPT */ -static int test_session_cmd( +static int SQLITE_TCLAPI test_session_cmd( void *clientData, Tcl_Interp *interp, int objc, @@ -254,7 +254,7 @@ static void test_session_del(void *clientData){ /* ** Tclcmd: sqlite3session CMD DB-HANDLE DB-NAME */ -static int test_sqlite3session( +static int SQLITE_TCLAPI test_sqlite3session( void * clientData, Tcl_Interp *interp, int objc, @@ -610,7 +610,7 @@ static int testStreamInput( /* ** sqlite3changeset_apply DB CHANGESET CONFLICT-SCRIPT ?FILTER-SCRIPT? */ -static int test_sqlite3changeset_apply( +static int SQLITE_TCLAPI test_sqlite3changeset_apply( void * clientData, Tcl_Interp *interp, int objc, @@ -665,7 +665,7 @@ static int test_sqlite3changeset_apply( /* ** sqlite3changeset_apply_replace_all DB CHANGESET */ -static int test_sqlite3changeset_apply_replace_all( +static int SQLITE_TCLAPI test_sqlite3changeset_apply_replace_all( void * clientData, Tcl_Interp *interp, int objc, @@ -700,7 +700,7 @@ static int test_sqlite3changeset_apply_replace_all( /* ** sqlite3changeset_invert CHANGESET */ -static int test_sqlite3changeset_invert( +static int SQLITE_TCLAPI test_sqlite3changeset_invert( void * clientData, Tcl_Interp *interp, int objc, @@ -739,7 +739,7 @@ static int test_sqlite3changeset_invert( /* ** sqlite3changeset_concat LEFT RIGHT */ -static int test_sqlite3changeset_concat( +static int SQLITE_TCLAPI test_sqlite3changeset_concat( void * clientData, Tcl_Interp *interp, int objc, @@ -787,7 +787,7 @@ static int test_sqlite3changeset_concat( /* ** sqlite3session_foreach VARNAME CHANGESET SCRIPT */ -static int test_sqlite3session_foreach( +static int SQLITE_TCLAPI test_sqlite3session_foreach( void * clientData, Tcl_Interp *interp, int objc, diff --git a/manifest b/manifest index 07a36a9f51..4738abe8bf 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C More\scompiler\swarning\sfixes\sfor\sGCC\srelated\sto\sthe\sauto-extension\smechanism. -D 2016-07-28T22:53:10.716 +C Use\sthe\sSQLITE_TCLAPI\smacro\sin\sseveral\sextensions\sthat\swere\smissed\sin\sthe\sprevious\scheck-in. +D 2016-07-28T23:54:45.174 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -107,7 +107,7 @@ F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2 F ext/fts5/fts5_index.c b429e23fabb57506f71e406997cc46b89190dc97 F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2 F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58 -F ext/fts5/fts5_tcl.c b41f04600936a2b910b5dff179e8bd050ccb34c7 +F ext/fts5/fts5_tcl.c caede54ed5eade83e1f455356e6dd2b849e1c703 F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8 @@ -255,7 +255,7 @@ F ext/rbu/rbuvacuum.test 4a977447c15c2581ab668781d9ef4294382530e0 F ext/rbu/rbuvacuum2.test 45009e127c3fb385e5c0fd5a8a63fb922a79d0ab F ext/rbu/sqlite3rbu.c 948677ee0ec57da51148e6c5f64ac68afcf36ab2 F ext/rbu/sqlite3rbu.h db8858120c9be14b60c9225f9da28221f5f6b945 -F ext/rbu/test_rbu.c c2c1859dfd69f1a55125d38009d0d49e36895780 +F ext/rbu/test_rbu.c fc84cd6aae50cfd8b2b2d5e9cdfc85e1925c303c F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/rtree.c d26a815b0df1c412a6881dae8d7fd3c9c08cce68 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e @@ -301,7 +301,7 @@ F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7 F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0 F ext/session/sqlite3session.c 37485891b4add26cf61495df193c419f36556a32 F ext/session/sqlite3session.h 69bf73cfd71e58f2ae5d2aa935b2c1a541aee555 -F ext/session/test_session.c ebf9acf2bd70885e6245512427f800693b65dc9c +F ext/session/test_session.c 5f9b1da42c5771fbe5948acd816ae9e8ae781353 F ext/userauth/sqlite3userauth.h 19cb6f0e31316d0ee4afdfb7a85ef9da3333a220 F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04 F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P bf9c86c74f30136a106f37603a6c7dcc76caf41d -R 664c66de93f8212f17433a2724631f1d +P b8218129bc848c61fa6910feae4141dac6ad86fc +R 66ac7539129e9f0d2a57c9cf5f4708c1 U mistachkin -Z 34c982f036e48065c3f321d45916961b +Z abcb763c1fb15cc18b4555018b76e16c diff --git a/manifest.uuid b/manifest.uuid index 2806d535ae..b5d59b835c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b8218129bc848c61fa6910feae4141dac6ad86fc \ No newline at end of file +df2543652b835353c03956dfbd3e35e5b191372e \ No newline at end of file From 2d45d7bfab45fc3488017f9573e2ccae423d5828 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 28 Jul 2016 23:58:25 +0000 Subject: [PATCH 18/24] Missed a couple Tcl command deletion callbacks. FossilOrigin-Name: fc5c187602acceedf7152b6927616d134f779a8f --- ext/fts5/fts5_tcl.c | 4 ++-- ext/session/test_session.c | 2 +- manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/fts5/fts5_tcl.c b/ext/fts5/fts5_tcl.c index 9a7077b61d..77e4a6cf35 100644 --- a/ext/fts5/fts5_tcl.c +++ b/ext/fts5/fts5_tcl.c @@ -168,7 +168,7 @@ static int xTokenizeCb( return rc; } -static int xF5tApi(void*, Tcl_Interp*, int, Tcl_Obj *CONST []); +static int SQLITE_TCLAPI xF5tApi(void*, Tcl_Interp*, int, Tcl_Obj *CONST []); static int xQueryPhraseCb( const Fts5ExtensionApi *pApi, @@ -996,7 +996,7 @@ static int SQLITE_TCLAPI f5tCreateTokenizer( return TCL_OK; } -static void xF5tFree(ClientData clientData){ +static void SQLITE_TCLAPI xF5tFree(ClientData clientData){ ckfree(clientData); } diff --git a/ext/session/test_session.c b/ext/session/test_session.c index b273565455..df34d84445 100644 --- a/ext/session/test_session.c +++ b/ext/session/test_session.c @@ -244,7 +244,7 @@ static int SQLITE_TCLAPI test_session_cmd( return TCL_OK; } -static void test_session_del(void *clientData){ +static void SQLITE_TCLAPI test_session_del(void *clientData){ TestSession *p = (TestSession*)clientData; if( p->pFilterScript ) Tcl_DecrRefCount(p->pFilterScript); sqlite3session_delete(p->pSession); diff --git a/manifest b/manifest index 4738abe8bf..74d5fa504c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Use\sthe\sSQLITE_TCLAPI\smacro\sin\sseveral\sextensions\sthat\swere\smissed\sin\sthe\sprevious\scheck-in. -D 2016-07-28T23:54:45.174 +C Missed\sa\scouple\sTcl\scommand\sdeletion\scallbacks. +D 2016-07-28T23:58:25.315 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -107,7 +107,7 @@ F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2 F ext/fts5/fts5_index.c b429e23fabb57506f71e406997cc46b89190dc97 F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2 F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58 -F ext/fts5/fts5_tcl.c caede54ed5eade83e1f455356e6dd2b849e1c703 +F ext/fts5/fts5_tcl.c 6805005886d6d9c83bb9b68bb69d32af4b37797e F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8 @@ -301,7 +301,7 @@ F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7 F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0 F ext/session/sqlite3session.c 37485891b4add26cf61495df193c419f36556a32 F ext/session/sqlite3session.h 69bf73cfd71e58f2ae5d2aa935b2c1a541aee555 -F ext/session/test_session.c 5f9b1da42c5771fbe5948acd816ae9e8ae781353 +F ext/session/test_session.c d0754c65952cc7c729efd63374e3d61fbd1ae94c F ext/userauth/sqlite3userauth.h 19cb6f0e31316d0ee4afdfb7a85ef9da3333a220 F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04 F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P b8218129bc848c61fa6910feae4141dac6ad86fc -R 66ac7539129e9f0d2a57c9cf5f4708c1 +P df2543652b835353c03956dfbd3e35e5b191372e +R 4f030271e7adab35739e0e6bab6a4279 U mistachkin -Z abcb763c1fb15cc18b4555018b76e16c +Z 7e68b7e2d6cc6fdfea65df6524031184 diff --git a/manifest.uuid b/manifest.uuid index b5d59b835c..ff4fc72f71 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -df2543652b835353c03956dfbd3e35e5b191372e \ No newline at end of file +fc5c187602acceedf7152b6927616d134f779a8f \ No newline at end of file From c08556844e97b3b1c3ee19eca99e6cc98ff537ac Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 29 Jul 2016 01:31:49 +0000 Subject: [PATCH 19/24] Add macro necessary for building several extensions when the __stdcall calling convention is not in use. FossilOrigin-Name: bc8c9b55ddf5227dc6b2116486f4a19bf54fce2b --- ext/fts5/fts5_tcl.c | 3 +++ ext/rbu/test_rbu.c | 3 +++ ext/session/test_session.c | 3 +++ manifest | 16 ++++++++-------- manifest.uuid | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ext/fts5/fts5_tcl.c b/ext/fts5/fts5_tcl.c index 77e4a6cf35..5fe690f6b7 100644 --- a/ext/fts5/fts5_tcl.c +++ b/ext/fts5/fts5_tcl.c @@ -18,6 +18,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #ifdef SQLITE_ENABLE_FTS5 diff --git a/ext/rbu/test_rbu.c b/ext/rbu/test_rbu.c index 548954d7f1..bc4c800331 100644 --- a/ext/rbu/test_rbu.c +++ b/ext/rbu/test_rbu.c @@ -21,6 +21,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif #include diff --git a/ext/session/test_session.c b/ext/session/test_session.c index df34d84445..103a1c2d7a 100644 --- a/ext/session/test_session.c +++ b/ext/session/test_session.c @@ -9,6 +9,9 @@ # include "sqlite_tcl.h" #else # include "tcl.h" +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif #endif typedef struct TestSession TestSession; diff --git a/manifest b/manifest index 74d5fa504c..3a567d4deb 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Missed\sa\scouple\sTcl\scommand\sdeletion\scallbacks. -D 2016-07-28T23:58:25.315 +C Add\smacro\snecessary\sfor\sbuilding\sseveral\sextensions\swhen\sthe\s__stdcall\scalling\sconvention\sis\snot\sin\suse. +D 2016-07-29T01:31:49.222 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -107,7 +107,7 @@ F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2 F ext/fts5/fts5_index.c b429e23fabb57506f71e406997cc46b89190dc97 F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2 F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58 -F ext/fts5/fts5_tcl.c 6805005886d6d9c83bb9b68bb69d32af4b37797e +F ext/fts5/fts5_tcl.c 4a901f00c8553740dba63511603f5527d741c26a F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8 @@ -255,7 +255,7 @@ F ext/rbu/rbuvacuum.test 4a977447c15c2581ab668781d9ef4294382530e0 F ext/rbu/rbuvacuum2.test 45009e127c3fb385e5c0fd5a8a63fb922a79d0ab F ext/rbu/sqlite3rbu.c 948677ee0ec57da51148e6c5f64ac68afcf36ab2 F ext/rbu/sqlite3rbu.h db8858120c9be14b60c9225f9da28221f5f6b945 -F ext/rbu/test_rbu.c fc84cd6aae50cfd8b2b2d5e9cdfc85e1925c303c +F ext/rbu/test_rbu.c 1a6bbc6982e32485a48df111d0bb1934d537eabd F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/rtree.c d26a815b0df1c412a6881dae8d7fd3c9c08cce68 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e @@ -301,7 +301,7 @@ F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7 F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0 F ext/session/sqlite3session.c 37485891b4add26cf61495df193c419f36556a32 F ext/session/sqlite3session.h 69bf73cfd71e58f2ae5d2aa935b2c1a541aee555 -F ext/session/test_session.c d0754c65952cc7c729efd63374e3d61fbd1ae94c +F ext/session/test_session.c 2caed9a659586428c63ca46e4900347b374487d4 F ext/userauth/sqlite3userauth.h 19cb6f0e31316d0ee4afdfb7a85ef9da3333a220 F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04 F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P df2543652b835353c03956dfbd3e35e5b191372e -R 4f030271e7adab35739e0e6bab6a4279 +P fc5c187602acceedf7152b6927616d134f779a8f +R d16dc76cf59643dacfea9f5d3d7324b6 U mistachkin -Z 7e68b7e2d6cc6fdfea65df6524031184 +Z 029d2b66c80fad0a70d5e0c29c8d9e88 diff --git a/manifest.uuid b/manifest.uuid index ff4fc72f71..3703d2538c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -fc5c187602acceedf7152b6927616d134f779a8f \ No newline at end of file +bc8c9b55ddf5227dc6b2116486f4a19bf54fce2b \ No newline at end of file From 99bbcc8287832d65fc954f29c5c340e1226292d5 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 29 Jul 2016 01:32:36 +0000 Subject: [PATCH 20/24] Undo some unhelpful changes to skip-scan scoring that were added by the check-in [9e2b2681] that improved scoring of index scan. FossilOrigin-Name: c7d51934a4f30d096bb79fc509fc9dd0df5d89a4 --- manifest | 18 +++++++++--------- manifest.uuid | 2 +- src/where.c | 4 ++-- test/scanstatus.test | 4 ++-- test/skipscan1.test | 16 ++++++++-------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/manifest b/manifest index 4df76977b0..fdc9dbc32a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C The\s'sqlite3ext.h'\scontent\sshould\sbe\sprocessed\sbefore\sbeing\sincluded\sin\sthe\samalgamation. -D 2016-07-28T19:28:35.475 +C Undo\ssome\sunhelpful\schanges\sto\sskip-scan\sscoring\sthat\swere\sadded\nby\sthe\scheck-in\s[9e2b2681]\sthat\simproved\sscoring\sof\sindex\sscan. +D 2016-07-29T01:32:36.387 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc eefec7a26bf73bb04f2241058e23a3ec8a43f656 @@ -463,7 +463,7 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9 F src/wal.c 02eeecc265f6ffd0597378f5d8ae9070b62a406a F src/wal.h 6dd221ed384afdc204bc61e25c23ef7fd5a511f2 F src/walker.c 0f142b5bd3ed2041fc52d773880748b212e63354 -F src/where.c 8ccc01f9227d41bfaf09360f108583be4a36d3b1 +F src/where.c fcaa38d19c2a7bb450cc57810bdc3d4eb36e00b0 F src/whereInt.h e5b939701a7ceffc5a3a8188a37f9746416ebcd0 F src/wherecode.c 99707d11907c71d289ee9553d2d1a22f1fd8ba41 F src/whereexpr.c d7dcbf14ce1b5876c1f76496162c30fcba669563 @@ -1027,7 +1027,7 @@ F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd F test/savepoint6.test f41279c5e137139fa5c21485773332c7adb98cd7 F test/savepoint7.test cde525ea3075283eb950cdcdefe23ead4f700daa F test/savepointfault.test f044eac64b59f09746c7020ee261734de82bf9b2 -F test/scanstatus.test 030acbbdcea6a3fc676fee99edc84f6f16c0cf92 +F test/scanstatus.test 5253c219e331318a437f436268e0e82345700285 F test/schema.test 8f7999be894260f151adf15c2c7540f1c6d6a481 F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5 F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38 @@ -1074,7 +1074,7 @@ F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3 F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5 F test/shrink.test 1b4330b1fd9e818c04726d45cb28db73087535ce F test/sidedelete.test f0ad71abe6233e3b153100f3b8d679b19a488329 -F test/skipscan1.test d37a75b4be4eb9dedeb69b4f38b1d0a74b5021d7 +F test/skipscan1.test f2d4482f195f018c3732374d3985fc34bcc3ae1a F test/skipscan2.test d1d1450952b7275f0b0a3a981f0230532743951a F test/skipscan3.test ec5bab3f81c7038b43450e7b3062e04a198bdbb5 F test/skipscan5.test 67817a4b6857c47e0e33ba3e506da6f23ef68de2 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P fd784887e125bf95f4799ad09cbcba6795173487 -R 159053f8c66afb3fed693021893388d2 -U mistachkin -Z 1fc3620b6fdad23d7ecfea7d673497bf +P cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1 +R 69cbd4ac65697876502fdf627dd430d9 +U drh +Z b3c6b81889b1e6498dbf215474f399c6 diff --git a/manifest.uuid b/manifest.uuid index ad3e416aac..e200b2ca41 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1 \ No newline at end of file +c7d51934a4f30d096bb79fc509fc9dd0df5d89a4 \ No newline at end of file diff --git a/src/where.c b/src/where.c index ca406a8172..da41c142fa 100644 --- a/src/where.c +++ b/src/where.c @@ -2478,11 +2478,11 @@ static int whereLoopAddBtreeIndex( pNew->nSkip++; pNew->aLTerm[pNew->nLTerm++] = 0; pNew->wsFlags |= WHERE_SKIPSCAN; - nIter = pProbe->aiRowLogEst[saved_nEq]+1 - pProbe->aiRowLogEst[saved_nEq+1]; + nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1]; pNew->nOut -= nIter; /* TUNING: Because uncertainties in the estimates for skip-scan queries, ** add a 1.375 fudge factor to make skip-scan slightly less likely. */ - nIter += 4; + nIter += 5; whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul); pNew->nOut = saved_nOut; pNew->u.btree.nEq = saved_nEq; diff --git a/test/scanstatus.test b/test/scanstatus.test index 48365a8794..ed24d97437 100644 --- a/test/scanstatus.test +++ b/test/scanstatus.test @@ -333,7 +333,7 @@ do_execsql_test 5.3.2 { SELECT count(*) FROM t2 WHERE y = 'j'; } {19} do_scanstatus_test 5.3.3 { - nLoop 1 nVisit 19 nEst 52.0 zName t2xy zExplain + nLoop 1 nVisit 19 nEst 56.0 zName t2xy zExplain {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)} } @@ -349,7 +349,7 @@ do_execsql_test 5.4.2 { do_scanstatus_test 5.4.3 { nLoop 1 nVisit 10 nEst 10.0 zName t1bc zExplain {SCAN TABLE t1 USING COVERING INDEX t1bc} - nLoop 10 nVisit 200 nEst 52.0 zName t2xy + nLoop 10 nVisit 200 nEst 56.0 zName t2xy zExplain {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)} } diff --git a/test/skipscan1.test b/test/skipscan1.test index ac26711603..6d77e63498 100644 --- a/test/skipscan1.test +++ b/test/skipscan1.test @@ -43,23 +43,23 @@ do_execsql_test skipscan1-1.2 { } {abc 345 7 8 | def 345 9 10 |} do_execsql_test skipscan1-1.2eqp { EXPLAIN QUERY PLAN - SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a; + SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a; } {/* USING INDEX t1abc (ANY(a) AND b=?)*/} do_execsql_test skipscan1-1.2sort { EXPLAIN QUERY PLAN - SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a; + SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a; } {~/*ORDER BY*/} do_execsql_test skipscan1-1.3 { - SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a DESC; + SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a DESC; } {def 345 9 10 | abc 345 7 8 |} do_execsql_test skipscan1-1.3eqp { EXPLAIN QUERY PLAN - SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a; + SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a DESC; } {/* USING INDEX t1abc (ANY(a) AND b=?)*/} do_execsql_test skipscan1-1.3sort { EXPLAIN QUERY PLAN - SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a; + SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a DESC; } {~/*ORDER BY*/} do_execsql_test skipscan1-1.4 { @@ -150,15 +150,15 @@ do_execsql_test skipscan1-2.1 { } {} do_execsql_test skipscan1-2.2 { - SELECT a,b,c,d,'|' FROM t2 WHERE b=345 ORDER BY a; + SELECT a,b,c,d,'|' FROM t2 WHERE d<>99 AND b=345 ORDER BY a; } {abc 345 7 8 | def 345 9 10 |} do_execsql_test skipscan1-2.2eqp { EXPLAIN QUERY PLAN - SELECT a,b,c,d,'|' FROM t2 WHERE b=345 ORDER BY a; + SELECT a,b,c,d,'|' FROM t2 WHERE d<>99 AND b=345 ORDER BY a; } {/* USING INDEX sqlite_autoindex_t2_1 (ANY(a) AND b=?)*/} do_execsql_test skipscan1-2.2sort { EXPLAIN QUERY PLAN - SELECT a,b,c,d,'|' FROM t2 WHERE b=345 ORDER BY a; + SELECT a,b,c,d,'|' FROM t2 WHERE d<>99 AND b=345 ORDER BY a; } {~/*ORDER BY*/} From fefe82876c71bb9433a2474236916d95997ec2e3 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 29 Jul 2016 01:46:57 +0000 Subject: [PATCH 21/24] Update the autoconf makefile for MSVC. FossilOrigin-Name: 2daf20980d4cb9ed36372778ae1f3e595e503549 --- autoconf/Makefile.msc | 11 +++++++++++ manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/autoconf/Makefile.msc b/autoconf/Makefile.msc index 2f7447383f..d3bbc6b4d2 100644 --- a/autoconf/Makefile.msc +++ b/autoconf/Makefile.msc @@ -24,6 +24,13 @@ TOP = . USE_FULLWARN = 0 !ENDIF +# Set this non-0 to enable full runtime error checks (-RTC1, etc). This +# has no effect if (any) optimizations are enabled. +# +!IFNDEF USE_RUNTIME_CHECKS +USE_RUNTIME_CHECKS = 0 +!ENDIF + # Set this non-0 to use "stdcall" calling convention for the core library # and shell executable. # @@ -740,6 +747,10 @@ RCC = $(RCC) -D_DEBUG !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0 TCC = $(TCC) -Od BCC = $(BCC) -Od +!IF $(USE_RUNTIME_CHECKS)!=0 +TCC = $(TCC) -RTC1 +BCC = $(BCC) -RTC1 +!ENDIF !ELSEIF $(OPTIMIZATIONS)>=3 TCC = $(TCC) -Ox BCC = $(BCC) -Ox diff --git a/manifest b/manifest index 3a567d4deb..02ee3f6e46 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\smacro\snecessary\sfor\sbuilding\sseveral\sextensions\swhen\sthe\s__stdcall\scalling\sconvention\sis\snot\sin\suse. -D 2016-07-29T01:31:49.222 +C Update\sthe\sautoconf\smakefile\sfor\sMSVC. +D 2016-07-29T01:46:57.427 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -11,7 +11,7 @@ F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am 1a47d071e3d5435f8f7ebff7eb6703848bbd65d4 -F autoconf/Makefile.msc 05a99e98a8895461574ccb9604444d9e97c1f0b6 +F autoconf/Makefile.msc 7a909aa9b538138a21c0626e3ffc4b1f4519f50e F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7 F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1 F autoconf/configure.ac cacf2616abf6e4a569bde2ef365c143caeec40bc @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P fc5c187602acceedf7152b6927616d134f779a8f -R d16dc76cf59643dacfea9f5d3d7324b6 +P bc8c9b55ddf5227dc6b2116486f4a19bf54fce2b +R 81c2da6dd9132e2ceb1da7d33d25fdb6 U mistachkin -Z 029d2b66c80fad0a70d5e0c29c8d9e88 +Z 72b9cccf5e1018e731ec3108866ee753 diff --git a/manifest.uuid b/manifest.uuid index 3703d2538c..b2d11c5e33 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -bc8c9b55ddf5227dc6b2116486f4a19bf54fce2b \ No newline at end of file +2daf20980d4cb9ed36372778ae1f3e595e503549 \ No newline at end of file From d62c07d42ebd9b12db27c89019a596745548e399 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 29 Jul 2016 02:04:36 +0000 Subject: [PATCH 22/24] Fix typo in a test file interactive output string. FossilOrigin-Name: 4fedd7902371935e1374ca7df3ffd4c4cf93959b --- manifest | 15 +++++++-------- manifest.uuid | 2 +- test/walprotocol.test | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/manifest b/manifest index da1d23e9ba..37d9dc7dd2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\sadditional\slinkage\smacro\schanges\sfrom\sthe\sbranch. -D 2016-07-29T01:55:42.841 +C Fix\stypo\sin\sa\stest\sfile\sinteractive\soutput\sstring. +D 2016-07-29T02:04:36.873 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -1374,7 +1374,7 @@ F test/walmode.test 4022fe03ae6e830583672caa101f046438a0473c F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496 F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03 F test/walpersist.test 8c6b7e3ec1ba91b5e4dc4e0921d6d3f87cd356a6 -F test/walprotocol.test 059cb75484a1ecf6357a2c1b3324b8156749221e +F test/walprotocol.test 0b92feb132ccebd855494d917d3f6c2d717ace20 F test/walro.test 4ab7ac01b77c2f894235c699d59e3e3c7f15a160 F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417 F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f @@ -1508,8 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 45588de385d2a721b3e9f04beb6c7b789dd27d42 71ffa195f5a48280ee522d80ab82e8cdea636961 -R 092b06ead5aa5690fab5536515621278 -T +closed 71ffa195f5a48280ee522d80ab82e8cdea636961 -U drh -Z 3d26d07289768bac8aea9d48f7d64298 +P 8b0eb22ee12b23421dcb8dbeb46909d813788a0b +R 1c5c6cdbf6280e0f07ddb24f0c5484bf +U mistachkin +Z 2e0de3b0c7e8ecb85c119417abdb6170 diff --git a/manifest.uuid b/manifest.uuid index e13e9140e9..becc573de8 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8b0eb22ee12b23421dcb8dbeb46909d813788a0b \ No newline at end of file +4fedd7902371935e1374ca7df3ffd4c4cf93959b \ No newline at end of file diff --git a/test/walprotocol.test b/test/walprotocol.test index d658de9d7c..ee8d0b72a5 100644 --- a/test/walprotocol.test +++ b/test/walprotocol.test @@ -69,7 +69,7 @@ proc lock_callback {method filename handle lock} { if {$lock == "1 7 lock exclusive"} { return SQLITE_BUSY } return SQLITE_OK } -puts "# Warning: This next test case causes SQLite to call xSlee(1) 100 times." +puts "# Warning: This next test case causes SQLite to call xSleep(1) 100 times." puts "# Normally this equates to a delay of roughly 10 seconds, but if SQLite" puts "# is built on unix without HAVE_USLEEP defined, it may be much longer." do_test 1.3 { From be56ad31b742d21496863b4b4105b137e7df712e Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 29 Jul 2016 04:12:18 +0000 Subject: [PATCH 23/24] For test 'shell1-5.0', disable round-trip testing for characters in the range 0xE0 to 0xEF on Linux, due to intermittent shell portability issues. FossilOrigin-Name: 544c990afd3b64064cc4d970ec5d7eb23eeb9914 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/shell1.test | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/manifest b/manifest index 37d9dc7dd2..4056580492 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\stypo\sin\sa\stest\sfile\sinteractive\soutput\sstring. -D 2016-07-29T02:04:36.873 +C For\stest\s'shell1-5.0',\sdisable\sround-trip\stesting\sfor\scharacters\sin\sthe\srange\s0xE0\sto\s0xEF\son\sLinux,\sdue\sto\sintermittent\sshell\sportability\sissues. +D 2016-07-29T04:12:18.810 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -1065,7 +1065,7 @@ F test/sharedA.test 0cdf1a76dfa00e6beee66af5b534b1e8df2720f5 F test/sharedB.test 16cc7178e20965d75278f410943109b77b2e645e F test/shared_err.test 2f2aee20db294b9924e81f6ccbe60f19e21e8506 F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304 -F test/shell1.test 77896b65f1cde4ee79e38b2c0ed8578a8f4000e5 +F test/shell1.test 65b10cd8a90cda9b5af9100a45689a57dcc01a31 F test/shell2.test e242a9912f44f4c23c3d1d802a83e934e84c853b F test/shell3.test da513d522ef6f01cee8475dcf8332bff8982b3dd F test/shell4.test 69995ee1cc278eb149aa8746ce1f935f4eaf98b9 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 8b0eb22ee12b23421dcb8dbeb46909d813788a0b -R 1c5c6cdbf6280e0f07ddb24f0c5484bf +P 4fedd7902371935e1374ca7df3ffd4c4cf93959b +R 85f77acfa5a811a346c23b19da557acb U mistachkin -Z 2e0de3b0c7e8ecb85c119417abdb6170 +Z a69746948670b38e6b2794c69171ee54 diff --git a/manifest.uuid b/manifest.uuid index becc573de8..3a0d9eb7fe 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4fedd7902371935e1374ca7df3ffd4c4cf93959b \ No newline at end of file +544c990afd3b64064cc4d970ec5d7eb23eeb9914 \ No newline at end of file diff --git a/test/shell1.test b/test/shell1.test index 03c2dee1d1..9a966fd8db 100644 --- a/test/shell1.test +++ b/test/shell1.test @@ -871,6 +871,7 @@ do_test shell1-5.0 { continue } if {$i>=0xE0 && $tcl_platform(os)=="OpenBSD"} continue + if {$i>=0xE0 && $i<=0xEF && $tcl_platform(os)=="Linux"} continue set hex [format %02X $i] set char [subst \\x$hex]; set oldChar $char set escapes [list] From 11f69b879c5b9f4dcd566fda776e03bc23c94147 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 29 Jul 2016 17:36:27 +0000 Subject: [PATCH 24/24] Using the header file 'intrin.h' requires MSVC 2005 or later. FossilOrigin-Name: 9fae75c08b7d3b3e13734193ad8398ef6971cbac --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/sqliteInt.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 4056580492..ddf53b746a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C For\stest\s'shell1-5.0',\sdisable\sround-trip\stesting\sfor\scharacters\sin\sthe\srange\s0xE0\sto\s0xEF\son\sLinux,\sdue\sto\sintermittent\sshell\sportability\sissues. -D 2016-07-29T04:12:18.810 +C Using\sthe\sheader\sfile\s'intrin.h'\srequires\sMSVC\s2005\sor\slater. +D 2016-07-29T17:36:27.088 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -388,7 +388,7 @@ F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5 F src/sqlite.h.in cd10e4206b91c4bf03f121ab9209a14af0b48f14 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h f4206565eb5f5cef9a1544d32a076b5f47af1bdc -F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052 +F src/sqliteInt.h d6f221a5bd572df935140beda82f357c2185a77c F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9 @@ -1508,7 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 4fedd7902371935e1374ca7df3ffd4c4cf93959b -R 85f77acfa5a811a346c23b19da557acb +P 544c990afd3b64064cc4d970ec5d7eb23eeb9914 +R ceef2b71453325469cbc16ff7674c4c9 U mistachkin -Z a69746948670b38e6b2794c69171ee54 +Z 0275ffb3719041525e752ce514a5292f diff --git a/manifest.uuid b/manifest.uuid index 3a0d9eb7fe..5827550e55 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -544c990afd3b64064cc4d970ec5d7eb23eeb9914 \ No newline at end of file +9fae75c08b7d3b3e13734193ad8398ef6971cbac \ No newline at end of file diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 35be76dfb0..0ce56ceab1 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -234,7 +234,7 @@ ** the SQLITE_DISABLE_INTRINSIC define. */ #if !defined(SQLITE_DISABLE_INTRINSIC) -# if defined(_MSC_VER) && _MSC_VER>=1300 +# if defined(_MSC_VER) && _MSC_VER>=1400 # if !defined(_WIN32_WCE) # include # pragma intrinsic(_byteswap_ushort)