Further refinement to the calling convention macros.
FossilOrigin-Name: 45588de385d2a721b3e9f04beb6c7b789dd27d42
This commit is contained in:
commit
e363d50db8
11
Makefile.msc
11
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
|
||||
|
@ -18,6 +18,9 @@
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_ENABLE_FTS5
|
||||
@ -82,7 +85,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,
|
||||
@ -168,7 +171,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,
|
||||
@ -213,7 +216,7 @@ static void xSetAuxdataDestructor(void *p){
|
||||
**
|
||||
** Description...
|
||||
*/
|
||||
static int xF5tApi(
|
||||
static int SQLITE_TCLAPI xF5tApi(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@ -606,7 +609,7 @@ static void xF5tDestroy(void *pCtx){
|
||||
**
|
||||
** Description...
|
||||
*/
|
||||
static int f5tCreateFunction(
|
||||
static int SQLITE_TCLAPI f5tCreateFunction(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@ -676,7 +679,7 @@ static int xTokenizeCb2(
|
||||
**
|
||||
** Description...
|
||||
*/
|
||||
static int f5tTokenize(
|
||||
static int SQLITE_TCLAPI f5tTokenize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@ -882,7 +885,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 +956,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,
|
||||
@ -996,7 +999,7 @@ static int f5tCreateTokenizer(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static void xF5tFree(ClientData clientData){
|
||||
static void SQLITE_TCLAPI xF5tFree(ClientData clientData){
|
||||
ckfree(clientData);
|
||||
}
|
||||
|
||||
@ -1005,7 +1008,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 +1040,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 +1065,7 @@ static int f5tTokenHash(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int f5tRegisterMatchinfo(
|
||||
static int SQLITE_TCLAPI f5tRegisterMatchinfo(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@ -1087,7 +1090,7 @@ static int f5tRegisterMatchinfo(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int f5tRegisterTok(
|
||||
static int SQLITE_TCLAPI f5tRegisterTok(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
@ -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;
|
||||
|
@ -21,6 +21,9 @@
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
@ -53,7 +56,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 +199,7 @@ static int test_sqlite3rbu_cmd(
|
||||
/*
|
||||
** Tclcmd: sqlite3rbu CMD <target-db> <rbu-db> ?<state-db>?
|
||||
*/
|
||||
static int test_sqlite3rbu(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@ -226,7 +229,7 @@ static int test_sqlite3rbu(
|
||||
/*
|
||||
** Tclcmd: sqlite3rbu_vacuum CMD <target-db> <state-db>
|
||||
*/
|
||||
static int test_sqlite3rbu_vacuum(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu_vacuum(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@ -254,7 +257,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 +292,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 +313,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,
|
||||
|
@ -9,6 +9,9 @@
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct TestSession TestSession;
|
||||
@ -111,7 +114,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,
|
||||
@ -244,7 +247,7 @@ static int 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);
|
||||
@ -254,7 +257,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 +613,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 +668,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 +703,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 +742,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 +790,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,
|
||||
|
36
manifest
36
manifest
@ -1,8 +1,8 @@
|
||||
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
|
||||
C Further\srefinement\sto\sthe\scalling\sconvention\smacros.
|
||||
D 2016-07-29T01:49:36.961
|
||||
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
|
||||
@ -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 4a901f00c8553740dba63511603f5527d741c26a
|
||||
F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc
|
||||
F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be
|
||||
F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8
|
||||
@ -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
|
||||
@ -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 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 ebf9acf2bd70885e6245512427f800693b65dc9c
|
||||
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
|
||||
@ -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 c3c2a37e4ce940d17c73971738754d412c79e09d
|
||||
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 cd10e4206b91c4bf03f121ab9209a14af0b48f14
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9
|
||||
F src/sqlite3ext.h f4206565eb5f5cef9a1544d32a076b5f47af1bdc
|
||||
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 bdae822f21e229b6daced15938b6343ce44ef454
|
||||
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 6f34b19ae097e3cf0b0fe5d6904cb9900e67f2ff
|
||||
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 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 cbe1de4799df4d512bc175f51ed99c6ec6d5a4d1
|
||||
R 69cbd4ac65697876502fdf627dd430d9
|
||||
P c7d51934a4f30d096bb79fc509fc9dd0df5d89a4 bc8c9b55ddf5227dc6b2116486f4a19bf54fce2b
|
||||
R 554600d1ca55e9b4c82a4274bcc372e8
|
||||
U drh
|
||||
Z b3c6b81889b1e6498dbf215474f399c6
|
||||
Z 5b5bfebf7f52a37872ab26a1ec1320c2
|
||||
|
@ -1 +1 @@
|
||||
c7d51934a4f30d096bb79fc509fc9dd0df5d89a4
|
||||
45588de385d2a721b3e9f04beb6c7b789dd27d42
|
@ -21,6 +21,14 @@
|
||||
#include <string.h>
|
||||
|
||||
#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(
|
||||
int (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *)
|
||||
){
|
||||
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<wsdAutoext.nExt; i++){
|
||||
if( wsdAutoext.aExt[i]==xInit ) break;
|
||||
if( wsdAutoext.aExt[i]==(void*)xInit ) break;
|
||||
}
|
||||
if( i==wsdAutoext.nExt ){
|
||||
u64 nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
|
||||
@ -688,7 +703,7 @@ int sqlite3_auto_extension(void (*xInit)(void)){
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
}else{
|
||||
wsdAutoext.aExt = aNew;
|
||||
wsdAutoext.aExt[wsdAutoext.nExt] = xInit;
|
||||
wsdAutoext.aExt[wsdAutoext.nExt] = (void*)xInit;
|
||||
wsdAutoext.nExt++;
|
||||
}
|
||||
}
|
||||
@ -707,7 +722,9 @@ int sqlite3_auto_extension(void (*xInit)(void)){
|
||||
** Return 1 if xInit was found on the list and removed. Return 0 if xInit
|
||||
** was not on the list.
|
||||
*/
|
||||
int sqlite3_cancel_auto_extension(void (*xInit)(void)){
|
||||
int sqlite3_cancel_auto_extension(
|
||||
int (*xInit)(sqlite3 *, char **, const sqlite3_api_routines *)
|
||||
){
|
||||
#if SQLITE_THREADSAFE
|
||||
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
|
||||
#endif
|
||||
@ -716,7 +733,7 @@ int sqlite3_cancel_auto_extension(void (*xInit)(void)){
|
||||
wsdAutoextInit;
|
||||
sqlite3_mutex_enter(mutex);
|
||||
for(i=(int)wsdAutoext.nExt-1; 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;
|
||||
|
@ -5707,7 +5707,10 @@ 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));
|
||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
|
||||
int sqlite3_auto_extension(
|
||||
int (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *)
|
||||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Cancel Automatic Extension Loading
|
||||
@ -5719,7 +5722,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(
|
||||
int (*xEntryPoint)(sqlite3 *, char **, const sqlite3_api_routines *)
|
||||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Reset Automatic Extension Loading
|
||||
|
@ -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(*)(void));
|
||||
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(*)(void));
|
||||
int (*cancel_auto_extension)(int(*)(sqlite3*,char**,
|
||||
const sqlite3_api_routines*));
|
||||
int (*load_extension)(sqlite3*,const char*,const char*,char**);
|
||||
void *(*malloc64)(sqlite3_uint64);
|
||||
sqlite3_uint64 (*msize)(void*);
|
||||
@ -286,6 +287,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.
|
||||
|
@ -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 sqlite3_api_routines *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 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 sqlite3_api_routines *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 sqlite3_api_routines *);
|
||||
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 sqlite3_api_routines *);
|
||||
|
||||
for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){
|
||||
Tcl_CreateObjCommand(interp, aObjCmd[i].zName, aObjCmd[i].xProc, 0, 0);
|
||||
}
|
||||
sqlite3_initialize();
|
||||
sqlite3_auto_extension((void*)registerTestFunctions);
|
||||
sqlite3_auto_extension((void*)Md5_Register);
|
||||
sqlite3_auto_extension(registerTestFunctions);
|
||||
sqlite3_auto_extension(Md5_Register);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
@ -1197,7 +1197,7 @@ int sqlite3_multiplex_initialize(const char *zOrigVfsName, int makeDefault){
|
||||
gMultiplex.sIoMethodsV2.xShmUnmap = multiplexShmUnmap;
|
||||
sqlite3_vfs_register(&gMultiplex.sThisVfs, makeDefault);
|
||||
|
||||
sqlite3_auto_extension((void*)multiplexFuncInit);
|
||||
sqlite3_auto_extension(multiplexFuncInit);
|
||||
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ static int SQLITE_TCLAPI sqlthread_open(
|
||||
const char *zFilename;
|
||||
sqlite3 *db;
|
||||
char zBuf[100];
|
||||
extern void Md5_Register(sqlite3*);
|
||||
extern int Md5_Register(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
|
||||
UNUSED_PARAMETER(clientData);
|
||||
UNUSED_PARAMETER(objc);
|
||||
@ -303,7 +303,7 @@ static int SQLITE_TCLAPI sqlthread_open(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Md5_Register(db);
|
||||
Md5_Register(db, 0, 0);
|
||||
sqlite3_busy_handler(db, xBusy, 0);
|
||||
|
||||
if( sqlite3TestMakePointerStr(interp, zBuf, db) ) return TCL_ERROR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user