mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Make sure the SQLITE_TCLAPI macro is always defined.
FossilOrigin-Name: f2f1323cc4d2ad2d6794dbfae8d50b747213e85d
This commit is contained in:
@@ -22,6 +22,9 @@
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -147,7 +150,7 @@ static int nm_match_count(
|
|||||||
/*
|
/*
|
||||||
** Tclcmd: fts3_near_match DOCUMENT EXPR ?OPTIONS?
|
** Tclcmd: fts3_near_match DOCUMENT EXPR ?OPTIONS?
|
||||||
*/
|
*/
|
||||||
static int fts3_near_match_cmd(
|
static int SQLITE_TCLAPI fts3_near_match_cmd(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -282,7 +285,7 @@ static int fts3_near_match_cmd(
|
|||||||
** # Restore initial incr-load settings:
|
** # Restore initial incr-load settings:
|
||||||
** eval fts3_configure_incr_load $cfg
|
** eval fts3_configure_incr_load $cfg
|
||||||
*/
|
*/
|
||||||
static int fts3_configure_incr_load_cmd(
|
static int SQLITE_TCLAPI fts3_configure_incr_load_cmd(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -492,7 +495,7 @@ static int testTokenizerLanguage(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int fts3_test_tokenizer_cmd(
|
static int SQLITE_TCLAPI fts3_test_tokenizer_cmd(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -521,7 +524,7 @@ static int fts3_test_tokenizer_cmd(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fts3_test_varint_cmd(
|
static int SQLITE_TCLAPI fts3_test_varint_cmd(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
82
manifest
82
manifest
@@ -1,5 +1,5 @@
|
|||||||
C More\swork\son\sgetting\sthe\s'testfixture.exe'\starget\sto\swork\scorrectly.
|
C Make\ssure\sthe\sSQLITE_TCLAPI\smacro\sis\salways\sdefined.
|
||||||
D 2016-07-28T16:09:52.017
|
D 2016-07-28T17:11:20.162
|
||||||
F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db
|
F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db
|
||||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||||
F Makefile.msc 1e5399407885d69150e2659f4710b5712a1e6cef
|
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_porter.c 3565faf04b626cddf85f03825e86056a4562c009
|
||||||
F ext/fts3/fts3_snippet.c 68ae118b0f834ea53d2b89e4087fc0f0b8c4ee4e
|
F ext/fts3/fts3_snippet.c 68ae118b0f834ea53d2b89e4087fc0f0b8c4ee4e
|
||||||
F ext/fts3/fts3_term.c 88c55a6fa1a51ab494e33dced0401a6c28791fd7
|
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_tokenize_vtab.c a27593ab19657166f6fa5ec073b678cc29a75860
|
||||||
F ext/fts3/fts3_tokenizer.c a22bf311a71f3efa9d7012d8cc48fc9b0f3dace7
|
F ext/fts3/fts3_tokenizer.c a22bf311a71f3efa9d7012d8cc48fc9b0f3dace7
|
||||||
F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
|
F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
|
||||||
@@ -388,55 +388,55 @@ F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5
|
|||||||
F src/sqlite.h.in a03063e698a43cc5c996cd341f39439a6ce58304
|
F src/sqlite.h.in a03063e698a43cc5c996cd341f39439a6ce58304
|
||||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||||
F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9
|
F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9
|
||||||
F src/sqliteInt.h d25c18c1272a7811e2569c39bfc2fca96156eead
|
F src/sqliteInt.h 14516943867eb2c30ce0e3670299958f59ade052
|
||||||
F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247
|
F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247
|
||||||
F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab
|
F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab
|
||||||
F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9
|
F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9
|
||||||
F src/tclsqlite.c e348648c28fcaa04ab8da98bf7e8a37b3629e634
|
F src/tclsqlite.c a9c6e33c44efa93d176ce5e0887d5d533c98b429
|
||||||
F src/test1.c a625e4d2857e0b08a9d66bdb737ce95b02326a9f
|
F src/test1.c 906a04b649c7139e943193a3905d583e325c30c7
|
||||||
F src/test2.c ce1e56fd0983866df1dbaf6c0558f3ad726ec222
|
F src/test2.c b7174313e993754303a8b33c43df7c44b46857ab
|
||||||
F src/test3.c 68b6b3b17df3028deda0a79607af70ff4ac5fc52
|
F src/test3.c 1339a40be39650ae83894b6578f971dc7f96ea8a
|
||||||
F src/test4.c a305bb93783fa0db03b9e5e899ec5367cf139903
|
F src/test4.c 18ec393bb4d0ad1de729f0b94da7267270f3d8e6
|
||||||
F src/test5.c 3ca6874d52d658607d2f25bb6ed88fd03ad78a6c
|
F src/test5.c 328aae2c010c57a9829d255dc099d6899311672d
|
||||||
F src/test6.c 4fc2c870b4f41d46f11a24b5c7dcff89486442b8
|
F src/test6.c 55aa2775c154415dcf4ed7cd1e19a193122b3a02
|
||||||
F src/test7.c 57b6dae963ff12cb6ef8389285427f07e8b042ff
|
F src/test7.c 5612e9aecf934d6df7bba6ce861fdf5ba5456010
|
||||||
F src/test8.c 33cefbf2911e12c74c6adb798cc0c8ee3287a58d
|
F src/test8.c 4f4904721167b32f7a4fa8c7b32a07a673d6cc86
|
||||||
F src/test9.c 6b9792e8a692a67fcce77dfe4a2ca4744c4ece54
|
F src/test9.c 12e5ba554d2d1cbe0158f6ab3f7ffcd7a86ee4e5
|
||||||
F src/test_async.c 233536b7e364a4a95597d6aa6fdf07fa9351de67
|
F src/test_async.c 195ab49da082053fdb0f949c114b806a49ca770a
|
||||||
F src/test_autoext.c 2a2343174ff46477dd081b7582dc1e72c69330bc
|
F src/test_autoext.c 6c8fe00caa3f38396f0990467179e9d1adb39ddd
|
||||||
F src/test_backup.c 7fe86c0be6c1a05a254b845a6aa32294dbdab012
|
F src/test_backup.c bf5da90c9926df0a4b941f2d92825a01bbe090a0
|
||||||
F src/test_bestindex.c 832b9968bf15d60029c1700905d56cefeb0f5dd7
|
F src/test_bestindex.c d23f80d334c59662af69191854c76b8d3d0c8c96
|
||||||
F src/test_blob.c 6af2552a059f326a107214fb13917f31a1606caf
|
F src/test_blob.c a0f7ad49a0c9d4b72f693fe2a71c58d7e507174d
|
||||||
F src/test_btree.c 3d2abd96336f1cbb760c7c5a758e74eaae98aed6
|
F src/test_btree.c 8b2dc8b8848cf3a4db93f11578f075e82252a274
|
||||||
F src/test_config.c 4d3d4a886416f369771d69a6dba926866deda788
|
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_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58
|
||||||
F src/test_fs.c 39086f99413e73f60afe2280a0ff27dfab63ab47
|
F src/test_fs.c ac62ce7d5c0c23aa6932891cad5746945564c91c
|
||||||
F src/test_func.c 4197173afb7d8453d3d0c7f7b109226dcef52997
|
F src/test_func.c 9cea6fee7ece5f46aa26e060b35e10dc6ba708cf
|
||||||
F src/test_hexio.c 2ab200d91f77085bd69c721dcb2b649f036d608b
|
F src/test_hexio.c 1d4469ca61ab202a1fcec6543f584d2407205e8d
|
||||||
F src/test_init.c a55015461868ca979d819f8db72aa682ba068185
|
F src/test_init.c 4413c211a94b62157ca4c145b3f27c497f03c664
|
||||||
F src/test_intarray.c 9fee7f930ff988dd0fc20315da4c762f77f01a78
|
F src/test_intarray.c 988fc61cb0ff539f4172c0d95f15287c92516f64
|
||||||
F src/test_intarray.h f3b7672f5d1056eac563c0d6ea8480a660b1475c
|
F src/test_intarray.h f3b7672f5d1056eac563c0d6ea8480a660b1475c
|
||||||
F src/test_journal.c d3b83f2bcb7792c709e57abddc456a2b1818643a
|
F src/test_journal.c d3b83f2bcb7792c709e57abddc456a2b1818643a
|
||||||
F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd
|
F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd
|
||||||
F src/test_malloc.c 90cbc63ebab11d16b440d394e77bc26629829f11
|
F src/test_malloc.c c05f6c40bd6c8bfe5f1718212f81fd5687f91766
|
||||||
F src/test_multiplex.c a0bcea72bc981f64c9c71edf22cc503cf83e0348
|
F src/test_multiplex.c af2792ec4436d442d1bd00b8803470a25111bad3
|
||||||
F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635
|
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_onefile.c 416f87a28d6d673352d33fc4b1c7d39db878e50f
|
||||||
F src/test_osinst.c 4e21c7b2709955f9907b80bfc874afb81ce1b4a7
|
F src/test_osinst.c 98ef31ff03d55497829ca0f6c74a9f4e1aa48690
|
||||||
F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00
|
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_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d
|
||||||
F src/test_rtree.c 0aad72f4854b01957b20c3c325eecd8512e9731d
|
F src/test_rtree.c 671f3fae50ff116ef2e32a3bf1fe21b5615b4b7b
|
||||||
F src/test_schema.c ab94aeab8a94486de3d2ce06567b7ee35f3a59b8
|
F src/test_schema.c f575932cb6274d12147a77e13ea4b49d52408513
|
||||||
F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe
|
F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe
|
||||||
F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b
|
F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b
|
||||||
F src/test_superlock.c 9389ee2aa8f8fa7487ea2e3bf01c033c65eaf21a
|
F src/test_superlock.c 4839644b9201da822f181c5bc406c0b2385f672e
|
||||||
F src/test_syscall.c 8313aa5d43989913c2dfd42b987e6ed29d6b8770
|
F src/test_syscall.c 1073306ba2e9bfc886771871a13d3de281ed3939
|
||||||
F src/test_tclvar.c 0239df9e83f9adc7b21ae01dce20229dd8592e71
|
F src/test_tclvar.c df9fe1213c2634687a9ca0b0bec0d2119d359ae3
|
||||||
F src/test_thread.c 30ae6818d21a168ef8cbceb9456411751c714cd9
|
F src/test_thread.c c7c40494b7a0603ebb6eb97c904545c0dceca5ff
|
||||||
F src/test_vfs.c 2edd39d413301baf15c1d7384f21c2e8b3fca2dd
|
F src/test_vfs.c f0186261a24de2671d080bcd8050732f0cb64f6e
|
||||||
F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698
|
F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698
|
||||||
F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61
|
F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61
|
||||||
F src/test_windirent.h b12055cab6227f7be10f5c19296f67c60cc5e2a5
|
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.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 478a84efa6ea13629227ba8970c8ef8545d31074
|
P 36b72fd609cf151f3db0e65b450d7cd515f2ac49
|
||||||
R 88324b2461565133820c548ccb01cb7e
|
R cb104ece8c53bb381905efecad762caf
|
||||||
U mistachkin
|
U mistachkin
|
||||||
Z 92e347019c063e4a6ca0b5b196166511
|
Z 5c80ddf3854cd75da2e73aafdf02283f
|
||||||
|
@@ -1 +1 @@
|
|||||||
36b72fd609cf151f3db0e65b450d7cd515f2ac49
|
f2f1323cc4d2ad2d6794dbfae8d50b747213e85d
|
@@ -42,6 +42,14 @@
|
|||||||
** asterisks and the comment text.
|
** 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
|
** Make sure that rand_s() is available on Windows systems with MSVC 2005
|
||||||
** or higher.
|
** or higher.
|
||||||
|
@@ -37,6 +37,9 @@
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
@@ -208,7 +211,10 @@ static void closeIncrblobChannels(SqliteDb *pDb){
|
|||||||
/*
|
/*
|
||||||
** Close an incremental blob channel.
|
** 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;
|
IncrblobChannel *p = (IncrblobChannel *)instanceData;
|
||||||
int rc = sqlite3_blob_close(p->pBlob);
|
int rc = sqlite3_blob_close(p->pBlob);
|
||||||
sqlite3 *db = p->pDb->db;
|
sqlite3 *db = p->pDb->db;
|
||||||
@@ -237,7 +243,7 @@ static int incrblobClose(ClientData instanceData, Tcl_Interp *interp){
|
|||||||
/*
|
/*
|
||||||
** Read data from an incremental blob channel.
|
** Read data from an incremental blob channel.
|
||||||
*/
|
*/
|
||||||
static int incrblobInput(
|
static int SQLITE_TCLAPI incrblobInput(
|
||||||
ClientData instanceData,
|
ClientData instanceData,
|
||||||
char *buf,
|
char *buf,
|
||||||
int bufSize,
|
int bufSize,
|
||||||
@@ -269,7 +275,7 @@ static int incrblobInput(
|
|||||||
/*
|
/*
|
||||||
** Write data to an incremental blob channel.
|
** Write data to an incremental blob channel.
|
||||||
*/
|
*/
|
||||||
static int incrblobOutput(
|
static int SQLITE_TCLAPI incrblobOutput(
|
||||||
ClientData instanceData,
|
ClientData instanceData,
|
||||||
CONST char *buf,
|
CONST char *buf,
|
||||||
int toWrite,
|
int toWrite,
|
||||||
@@ -302,7 +308,7 @@ static int incrblobOutput(
|
|||||||
/*
|
/*
|
||||||
** Seek an incremental blob channel.
|
** Seek an incremental blob channel.
|
||||||
*/
|
*/
|
||||||
static int incrblobSeek(
|
static int SQLITE_TCLAPI incrblobSeek(
|
||||||
ClientData instanceData,
|
ClientData instanceData,
|
||||||
long offset,
|
long offset,
|
||||||
int seekMode,
|
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 */
|
/* 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;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,7 +503,7 @@ static void flushStmtCache(SqliteDb *pDb){
|
|||||||
** TCL calls this procedure when an sqlite3 database command is
|
** TCL calls this procedure when an sqlite3 database command is
|
||||||
** deleted.
|
** deleted.
|
||||||
*/
|
*/
|
||||||
static void DbDeleteCmd(void *db){
|
static void SQLITE_TCLAPI DbDeleteCmd(void *db){
|
||||||
SqliteDb *pDb = (SqliteDb*)db;
|
SqliteDb *pDb = (SqliteDb*)db;
|
||||||
flushStmtCache(pDb);
|
flushStmtCache(pDb);
|
||||||
closeIncrblobChannels(pDb);
|
closeIncrblobChannels(pDb);
|
||||||
@@ -1795,7 +1808,12 @@ static void DbHookCmd(
|
|||||||
** and calls that connection "db1". The second command causes this
|
** and calls that connection "db1". The second command causes this
|
||||||
** subroutine to be invoked.
|
** 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;
|
SqliteDb *pDb = (SqliteDb*)cd;
|
||||||
int choice;
|
int choice;
|
||||||
int rc = TCL_OK;
|
int rc = TCL_OK;
|
||||||
@@ -3263,7 +3281,12 @@ static int DbObjCmdAdaptor(
|
|||||||
** The second argument is the name of the database file.
|
** 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;
|
SqliteDb *p;
|
||||||
const char *zArg;
|
const char *zArg;
|
||||||
char *zErrMsg;
|
char *zErrMsg;
|
||||||
@@ -3935,7 +3958,7 @@ static const char *tclsh_main_loop(void);
|
|||||||
|
|
||||||
#ifdef SQLITE_TEST
|
#ifdef SQLITE_TEST
|
||||||
static void init_all(Tcl_Interp *);
|
static void init_all(Tcl_Interp *);
|
||||||
static int init_all_cmd(
|
static int SQLITE_TCLAPI init_all_cmd(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -3965,7 +3988,7 @@ static int init_all_cmd(
|
|||||||
** to use the sqlite3_prepare_v2() function to prepare statements. If it
|
** to use the sqlite3_prepare_v2() function to prepare statements. If it
|
||||||
** is false, sqlite3_prepare().
|
** is false, sqlite3_prepare().
|
||||||
*/
|
*/
|
||||||
static int db_use_legacy_prepare_cmd(
|
static int SQLITE_TCLAPI db_use_legacy_prepare_cmd(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -4002,7 +4025,7 @@ static int db_use_legacy_prepare_cmd(
|
|||||||
** return the text representation of the most recently used statement
|
** return the text representation of the most recently used statement
|
||||||
** handle.
|
** handle.
|
||||||
*/
|
*/
|
||||||
static int db_last_stmt_ptr(
|
static int SQLITE_TCLAPI db_last_stmt_ptr(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
360
src/test1.c
360
src/test1.c
File diff suppressed because it is too large
Load Diff
40
src/test2.c
40
src/test2.c
@@ -42,7 +42,7 @@ static void pager_test_reiniter(DbPage *pNotUsed){
|
|||||||
**
|
**
|
||||||
** Open a new pager
|
** Open a new pager
|
||||||
*/
|
*/
|
||||||
static int pager_open(
|
static int SQLITE_TCLAPI pager_open(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -79,7 +79,7 @@ static int pager_open(
|
|||||||
**
|
**
|
||||||
** Close the given pager.
|
** Close the given pager.
|
||||||
*/
|
*/
|
||||||
static int pager_close(
|
static int SQLITE_TCLAPI pager_close(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -106,7 +106,7 @@ static int pager_close(
|
|||||||
**
|
**
|
||||||
** Rollback changes
|
** Rollback changes
|
||||||
*/
|
*/
|
||||||
static int pager_rollback(
|
static int SQLITE_TCLAPI pager_rollback(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -133,7 +133,7 @@ static int pager_rollback(
|
|||||||
**
|
**
|
||||||
** Commit all changes
|
** Commit all changes
|
||||||
*/
|
*/
|
||||||
static int pager_commit(
|
static int SQLITE_TCLAPI pager_commit(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -165,7 +165,7 @@ static int pager_commit(
|
|||||||
**
|
**
|
||||||
** Start a new checkpoint.
|
** Start a new checkpoint.
|
||||||
*/
|
*/
|
||||||
static int pager_stmt_begin(
|
static int SQLITE_TCLAPI pager_stmt_begin(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -192,7 +192,7 @@ static int pager_stmt_begin(
|
|||||||
**
|
**
|
||||||
** Rollback changes to a checkpoint
|
** Rollback changes to a checkpoint
|
||||||
*/
|
*/
|
||||||
static int pager_stmt_rollback(
|
static int SQLITE_TCLAPI pager_stmt_rollback(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -220,7 +220,7 @@ static int pager_stmt_rollback(
|
|||||||
**
|
**
|
||||||
** Commit changes to a checkpoint
|
** Commit changes to a checkpoint
|
||||||
*/
|
*/
|
||||||
static int pager_stmt_commit(
|
static int SQLITE_TCLAPI pager_stmt_commit(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -247,7 +247,7 @@ static int pager_stmt_commit(
|
|||||||
**
|
**
|
||||||
** Return pager statistics.
|
** Return pager statistics.
|
||||||
*/
|
*/
|
||||||
static int pager_stats(
|
static int SQLITE_TCLAPI pager_stats(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -280,7 +280,7 @@ static int pager_stats(
|
|||||||
**
|
**
|
||||||
** Return the size of the database file.
|
** Return the size of the database file.
|
||||||
*/
|
*/
|
||||||
static int pager_pagecount(
|
static int SQLITE_TCLAPI pager_pagecount(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -306,7 +306,7 @@ static int pager_pagecount(
|
|||||||
**
|
**
|
||||||
** Return a pointer to a page from the database.
|
** Return a pointer to a page from the database.
|
||||||
*/
|
*/
|
||||||
static int page_get(
|
static int SQLITE_TCLAPI page_get(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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.
|
** Return a pointer to a page if the page is already in cache.
|
||||||
** If not in cache, return an empty string.
|
** If not in cache, return an empty string.
|
||||||
*/
|
*/
|
||||||
static int page_lookup(
|
static int SQLITE_TCLAPI page_lookup(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -371,7 +371,7 @@ static int page_lookup(
|
|||||||
/*
|
/*
|
||||||
** Usage: pager_truncate ID PGNO
|
** Usage: pager_truncate ID PGNO
|
||||||
*/
|
*/
|
||||||
static int pager_truncate(
|
static int SQLITE_TCLAPI pager_truncate(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -396,7 +396,7 @@ static int pager_truncate(
|
|||||||
**
|
**
|
||||||
** Drop a pointer to a page.
|
** Drop a pointer to a page.
|
||||||
*/
|
*/
|
||||||
static int page_unref(
|
static int SQLITE_TCLAPI page_unref(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -418,7 +418,7 @@ static int page_unref(
|
|||||||
**
|
**
|
||||||
** Return the content of a page
|
** Return the content of a page
|
||||||
*/
|
*/
|
||||||
static int page_read(
|
static int SQLITE_TCLAPI page_read(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -442,7 +442,7 @@ static int page_read(
|
|||||||
**
|
**
|
||||||
** Return the page number for a page.
|
** Return the page number for a page.
|
||||||
*/
|
*/
|
||||||
static int page_number(
|
static int SQLITE_TCLAPI page_number(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -466,7 +466,7 @@ static int page_number(
|
|||||||
**
|
**
|
||||||
** Write something into a page.
|
** Write something into a page.
|
||||||
*/
|
*/
|
||||||
static int page_write(
|
static int SQLITE_TCLAPI page_write(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** new pages after N. If N is 2096 or bigger, this will test the
|
||||||
** ability of SQLite to write to large files.
|
** ability of SQLite to write to large files.
|
||||||
*/
|
*/
|
||||||
static int fake_big_file(
|
static int SQLITE_TCLAPI fake_big_file(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -555,7 +555,7 @@ static int fake_big_file(
|
|||||||
**
|
**
|
||||||
** Set the PENDING_BYTE using the sqlite3_test_control() interface.
|
** Set the PENDING_BYTE using the sqlite3_test_control() interface.
|
||||||
*/
|
*/
|
||||||
static int testPendingByte(
|
static int SQLITE_TCLAPI testPendingByte(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -620,7 +620,7 @@ static int faultSimCallback(int x){
|
|||||||
** appended, whenever sqlite3FaultSim() is called. Or, if SCRIPT is the
|
** appended, whenever sqlite3FaultSim() is called. Or, if SCRIPT is the
|
||||||
** empty string, cancel the sqlite3FaultSim() callback.
|
** empty string, cancel the sqlite3FaultSim() callback.
|
||||||
*/
|
*/
|
||||||
static int faultInstallCmd(
|
static int SQLITE_TCLAPI faultInstallCmd(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -663,7 +663,7 @@ static int faultInstallCmd(
|
|||||||
** Invoke the SQLITE_TESTCTRL_BITVEC_TEST operator on test_control.
|
** Invoke the SQLITE_TESTCTRL_BITVEC_TEST operator on test_control.
|
||||||
** See comments on sqlite3BitvecBuiltinTest() for additional information.
|
** See comments on sqlite3BitvecBuiltinTest() for additional information.
|
||||||
*/
|
*/
|
||||||
static int testBitvecBuiltinTest(
|
static int SQLITE_TCLAPI testBitvecBuiltinTest(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
|
30
src/test3.c
30
src/test3.c
@@ -37,7 +37,7 @@ static int nRefSqlite3 = 0;
|
|||||||
**
|
**
|
||||||
** Open a new database
|
** Open a new database
|
||||||
*/
|
*/
|
||||||
static int btree_open(
|
static int SQLITE_TCLAPI btree_open(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -83,7 +83,7 @@ static int btree_open(
|
|||||||
**
|
**
|
||||||
** Close the given database.
|
** Close the given database.
|
||||||
*/
|
*/
|
||||||
static int btree_close(
|
static int SQLITE_TCLAPI btree_close(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -118,7 +118,7 @@ static int btree_close(
|
|||||||
**
|
**
|
||||||
** Start a new transaction
|
** Start a new transaction
|
||||||
*/
|
*/
|
||||||
static int btree_begin_transaction(
|
static int SQLITE_TCLAPI btree_begin_transaction(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -147,7 +147,7 @@ static int btree_begin_transaction(
|
|||||||
**
|
**
|
||||||
** Returns pager statistics
|
** Returns pager statistics
|
||||||
*/
|
*/
|
||||||
static int btree_pager_stats(
|
static int SQLITE_TCLAPI btree_pager_stats(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -197,7 +197,7 @@ static int btree_pager_stats(
|
|||||||
**
|
**
|
||||||
** Create a new cursor. Return the ID for the cursor.
|
** Create a new cursor. Return the ID for the cursor.
|
||||||
*/
|
*/
|
||||||
static int btree_cursor(
|
static int SQLITE_TCLAPI btree_cursor(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -246,7 +246,7 @@ static int btree_cursor(
|
|||||||
**
|
**
|
||||||
** Close a cursor opened using btree_cursor.
|
** Close a cursor opened using btree_cursor.
|
||||||
*/
|
*/
|
||||||
static int btree_close_cursor(
|
static int SQLITE_TCLAPI btree_close_cursor(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** or 1 if the cursor was already on the last entry in the table or if
|
||||||
** the table is empty.
|
** the table is empty.
|
||||||
*/
|
*/
|
||||||
static int btree_next(
|
static int SQLITE_TCLAPI btree_next(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** 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.
|
** 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,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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 TRUE if the given cursor is not pointing at a valid entry.
|
||||||
** Return FALSE if the cursor does point to 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,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -382,7 +382,7 @@ static int btree_eof(
|
|||||||
**
|
**
|
||||||
** Return the number of bytes of payload
|
** Return the number of bytes of payload
|
||||||
*/
|
*/
|
||||||
static int btree_payload_size(
|
static int SQLITE_TCLAPI btree_payload_size(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** This command returns nothing if it works. It returns an error message
|
||||||
** if something goes wrong.
|
** if something goes wrong.
|
||||||
*/
|
*/
|
||||||
static int btree_varint_test(
|
static int SQLITE_TCLAPI btree_varint_test(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -504,7 +504,7 @@ static int btree_varint_test(
|
|||||||
** sqlite3 db test.db
|
** sqlite3 db test.db
|
||||||
** set bt [btree_from_db db]
|
** set bt [btree_from_db db]
|
||||||
*/
|
*/
|
||||||
static int btree_from_db(
|
static int SQLITE_TCLAPI btree_from_db(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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.
|
** Return true if the B-Tree is currently stored entirely in memory.
|
||||||
*/
|
*/
|
||||||
static int btree_ismemdb(
|
static int SQLITE_TCLAPI btree_ismemdb(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -575,7 +575,7 @@ static int btree_ismemdb(
|
|||||||
**
|
**
|
||||||
** Set the size of the cache used by btree $ID.
|
** 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,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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.
|
** Set the size of the cache used by btree $ID.
|
||||||
*/
|
*/
|
||||||
static int btree_insert(
|
static int SQLITE_TCLAPI btree_insert(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
30
src/test4.c
30
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
|
** NAME should be an upper case letter. Start the thread running with
|
||||||
** an open connection to the given database.
|
** an open connection to the given database.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_create(
|
static int SQLITE_TCLAPI tcl_thread_create(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -174,7 +174,7 @@ static void thread_wait(Thread *p){
|
|||||||
**
|
**
|
||||||
** Wait on thread ID to reach its idle state.
|
** Wait on thread ID to reach its idle state.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_wait(
|
static int SQLITE_TCLAPI tcl_thread_wait(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Cause a thread to shut itself down. Wait for the shutdown to be
|
||||||
** completed. If ID is "*" then stop all threads.
|
** completed. If ID is "*" then stop all threads.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_halt(
|
static int SQLITE_TCLAPI tcl_thread_halt(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent thread_step to complete, then return the
|
||||||
** number of columns in the result set.
|
** number of columns in the result set.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_argc(
|
static int SQLITE_TCLAPI tcl_thread_argc(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent thread_step to complete, then return the
|
||||||
** value of the N-th columns in the result set.
|
** value of the N-th columns in the result set.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_argv(
|
static int SQLITE_TCLAPI tcl_thread_argv(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent thread_step to complete, then return the
|
||||||
** name of the N-th columns in the result set.
|
** name of the N-th columns in the result set.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_colname(
|
static int SQLITE_TCLAPI tcl_thread_colname(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent operation to complete, then return the
|
||||||
** result code from that operation.
|
** result code from that operation.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_result(
|
static int SQLITE_TCLAPI tcl_thread_result(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent operation to complete, then return the
|
||||||
** error string.
|
** error string.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_error(
|
static int SQLITE_TCLAPI tcl_thread_error(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -434,7 +434,7 @@ static void do_compile(Thread *p){
|
|||||||
**
|
**
|
||||||
** Compile a new virtual machine.
|
** Compile a new virtual machine.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_compile(
|
static int SQLITE_TCLAPI tcl_thread_compile(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -487,7 +487,7 @@ static void do_step(Thread *p){
|
|||||||
**
|
**
|
||||||
** Advance the virtual machine by one step
|
** Advance the virtual machine by one step
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_step(
|
static int SQLITE_TCLAPI tcl_thread_step(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -529,7 +529,7 @@ static void do_finalize(Thread *p){
|
|||||||
**
|
**
|
||||||
** Finalize the virtual machine.
|
** Finalize the virtual machine.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_finalize(
|
static int SQLITE_TCLAPI tcl_thread_finalize(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -560,7 +560,7 @@ static int tcl_thread_finalize(
|
|||||||
**
|
**
|
||||||
** Interchange the sqlite* pointer between two threads.
|
** Interchange the sqlite* pointer between two threads.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_swap(
|
static int SQLITE_TCLAPI tcl_thread_swap(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -600,7 +600,7 @@ static int tcl_thread_swap(
|
|||||||
** remove the pointer from the thread itself. Afterwards, the thread
|
** remove the pointer from the thread itself. Afterwards, the thread
|
||||||
** can be stopped and the connection can be used by the main 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,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -631,7 +631,7 @@ static int tcl_thread_db_get(
|
|||||||
** Usage: thread_db_put ID DB
|
** Usage: thread_db_put ID DB
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_db_put(
|
static int SQLITE_TCLAPI tcl_thread_db_put(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Return the database stmt pointer for the given thread. Then
|
||||||
** remove the pointer from the thread itself.
|
** remove the pointer from the thread itself.
|
||||||
*/
|
*/
|
||||||
static int tcl_thread_stmt_get(
|
static int SQLITE_TCLAPI tcl_thread_stmt_get(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
** object with the encoded representation of the string, including
|
** object with the encoded representation of the string, including
|
||||||
** the NULL terminator.
|
** the NULL terminator.
|
||||||
*/
|
*/
|
||||||
static int binarize(
|
static int SQLITE_TCLAPI binarize(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -58,7 +58,7 @@ static int binarize(
|
|||||||
** If <do-calls> is 0, then the calls to sqlite3_value_text() are not
|
** If <do-calls> is 0, then the calls to sqlite3_value_text() are not
|
||||||
** actually made.
|
** actually made.
|
||||||
*/
|
*/
|
||||||
static int test_value_overhead(
|
static int SQLITE_TCLAPI test_value_overhead(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -122,7 +122,7 @@ static u8 name_to_enc(Tcl_Interp *interp, Tcl_Obj *pObj){
|
|||||||
** Usage: test_translate <string/blob> <from enc> <to enc> ?<transient>?
|
** Usage: test_translate <string/blob> <from enc> <to enc> ?<transient>?
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
static int test_translate(
|
static int SQLITE_TCLAPI test_translate(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -186,7 +186,7 @@ static int test_translate(
|
|||||||
** translation. If there is a problem an assert() will fail.
|
** translation. If there is a problem an assert() will fail.
|
||||||
**/
|
**/
|
||||||
void sqlite3UtfSelfTest(void);
|
void sqlite3UtfSelfTest(void);
|
||||||
static int test_translate_selftest(
|
static int SQLITE_TCLAPI test_translate_selftest(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
14
src/test6.c
14
src/test6.c
@@ -811,7 +811,7 @@ static int processDevSymArgs(
|
|||||||
** Simulate a crash immediately. This function does not return
|
** Simulate a crash immediately. This function does not return
|
||||||
** (writeListSync() calls exit(-1)).
|
** (writeListSync() calls exit(-1)).
|
||||||
*/
|
*/
|
||||||
static int crashNowCmd(
|
static int SQLITE_TCLAPI crashNowCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -832,7 +832,7 @@ static int crashNowCmd(
|
|||||||
** Parameter ENABLE must be a boolean value. If true, then the "crash"
|
** Parameter ENABLE must be a boolean value. If true, then the "crash"
|
||||||
** vfs is added to the system. If false, it is removed.
|
** vfs is added to the system. If false, it is removed.
|
||||||
*/
|
*/
|
||||||
static int crashEnableCmd(
|
static int SQLITE_TCLAPI crashEnableCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -907,7 +907,7 @@ static int crashEnableCmd(
|
|||||||
** sqlite_crashparams -sect 1024 -char {atomic sequential} ./test.db 1
|
** sqlite_crashparams -sect 1024 -char {atomic sequential} ./test.db 1
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
static int crashParamsObjCmd(
|
static int SQLITE_TCLAPI crashParamsObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -954,7 +954,7 @@ error:
|
|||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int devSymObjCmd(
|
static int SQLITE_TCLAPI devSymObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -977,7 +977,7 @@ static int devSymObjCmd(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: unregister_devsim
|
** tclcmd: unregister_devsim
|
||||||
*/
|
*/
|
||||||
static int dsUnregisterObjCmd(
|
static int SQLITE_TCLAPI dsUnregisterObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -997,7 +997,7 @@ static int dsUnregisterObjCmd(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: register_jt_vfs ?-default? PARENT-VFS
|
** tclcmd: register_jt_vfs ?-default? PARENT-VFS
|
||||||
*/
|
*/
|
||||||
static int jtObjCmd(
|
static int SQLITE_TCLAPI jtObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1035,7 +1035,7 @@ static int jtObjCmd(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: unregister_jt_vfs
|
** tclcmd: unregister_jt_vfs
|
||||||
*/
|
*/
|
||||||
static int jtUnregisterObjCmd(
|
static int SQLITE_TCLAPI jtUnregisterObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
26
src/test7.c
26
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
|
** NAME should be an upper case letter. Start the thread running with
|
||||||
** an open connection to the given database.
|
** an open connection to the given database.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_create(
|
static int SQLITE_TCLAPI tcl_client_create(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -206,7 +206,7 @@ static void client_wait(Thread *p){
|
|||||||
**
|
**
|
||||||
** Wait on thread ID to reach its idle state.
|
** Wait on thread ID to reach its idle state.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_wait(
|
static int SQLITE_TCLAPI tcl_client_wait(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Cause a client thread to shut itself down. Wait for the shutdown to be
|
||||||
** completed. If ID is "*" then stop all client threads.
|
** completed. If ID is "*" then stop all client threads.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_halt(
|
static int SQLITE_TCLAPI tcl_client_halt(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent client_step to complete, then return the
|
||||||
** number of columns in the result set.
|
** number of columns in the result set.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_argc(
|
static int SQLITE_TCLAPI tcl_client_argc(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent client_step to complete, then return the
|
||||||
** value of the N-th columns in the result set.
|
** value of the N-th columns in the result set.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_argv(
|
static int SQLITE_TCLAPI tcl_client_argv(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent client_step to complete, then return the
|
||||||
** name of the N-th columns in the result set.
|
** name of the N-th columns in the result set.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_colname(
|
static int SQLITE_TCLAPI tcl_client_colname(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent operation to complete, then return the
|
||||||
** result code from that operation.
|
** result code from that operation.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_result(
|
static int SQLITE_TCLAPI tcl_client_result(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
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
|
** Wait on the most recent operation to complete, then return the
|
||||||
** error string.
|
** error string.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_error(
|
static int SQLITE_TCLAPI tcl_client_error(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -481,7 +481,7 @@ static void do_compile(Thread *p){
|
|||||||
**
|
**
|
||||||
** Compile a new virtual machine.
|
** Compile a new virtual machine.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_compile(
|
static int SQLITE_TCLAPI tcl_client_compile(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -534,7 +534,7 @@ static void do_step(Thread *p){
|
|||||||
**
|
**
|
||||||
** Advance the virtual machine by one step
|
** Advance the virtual machine by one step
|
||||||
*/
|
*/
|
||||||
static int tcl_client_step(
|
static int SQLITE_TCLAPI tcl_client_step(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -576,7 +576,7 @@ static void do_finalize(Thread *p){
|
|||||||
**
|
**
|
||||||
** Finalize the virtual machine.
|
** Finalize the virtual machine.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_finalize(
|
static int SQLITE_TCLAPI tcl_client_finalize(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -620,7 +620,7 @@ static void do_reset(Thread *p){
|
|||||||
**
|
**
|
||||||
** Finalize the virtual machine.
|
** Finalize the virtual machine.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_reset(
|
static int SQLITE_TCLAPI tcl_client_reset(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
@@ -651,7 +651,7 @@ static int tcl_client_reset(
|
|||||||
**
|
**
|
||||||
** Interchange the sqlite* pointer between two threads.
|
** Interchange the sqlite* pointer between two threads.
|
||||||
*/
|
*/
|
||||||
static int tcl_client_swap(
|
static int SQLITE_TCLAPI tcl_client_swap(
|
||||||
void *NotUsed,
|
void *NotUsed,
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int argc, /* Number of arguments */
|
int argc, /* Number of arguments */
|
||||||
|
@@ -1357,7 +1357,7 @@ static void moduleDestroy(void *p){
|
|||||||
/*
|
/*
|
||||||
** Register the echo virtual table module.
|
** 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 */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -1397,7 +1397,7 @@ static int register_echo_module(
|
|||||||
**
|
**
|
||||||
** sqlite3_declare_vtab DB SQL
|
** sqlite3_declare_vtab DB SQL
|
||||||
*/
|
*/
|
||||||
static int declare_vtab(
|
static int SQLITE_TCLAPI declare_vtab(
|
||||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
/*
|
/*
|
||||||
** c_collation_test
|
** c_collation_test
|
||||||
*/
|
*/
|
||||||
static int c_collation_test(
|
static int SQLITE_TCLAPI c_collation_test(
|
||||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -67,7 +67,7 @@ error_out:
|
|||||||
/*
|
/*
|
||||||
** c_realloc_test
|
** c_realloc_test
|
||||||
*/
|
*/
|
||||||
static int c_realloc_test(
|
static int SQLITE_TCLAPI c_realloc_test(
|
||||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -108,7 +108,7 @@ error_out:
|
|||||||
/*
|
/*
|
||||||
** c_misuse_test
|
** c_misuse_test
|
||||||
*/
|
*/
|
||||||
static int c_misuse_test(
|
static int SQLITE_TCLAPI c_misuse_test(
|
||||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -19,6 +19,9 @@
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SQLITE_ENABLE_ASYNCIO
|
#ifdef SQLITE_ENABLE_ASYNCIO
|
||||||
@@ -40,7 +43,7 @@ TCL_DECLARE_MUTEX(testasync_g_writerMutex);
|
|||||||
/*
|
/*
|
||||||
** sqlite3async_initialize PARENT-VFS ISDEFAULT
|
** sqlite3async_initialize PARENT-VFS ISDEFAULT
|
||||||
*/
|
*/
|
||||||
static int testAsyncInit(
|
static int SQLITE_TCLAPI testAsyncInit(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -73,7 +76,7 @@ static int testAsyncInit(
|
|||||||
/*
|
/*
|
||||||
** sqlite3async_shutdown
|
** sqlite3async_shutdown
|
||||||
*/
|
*/
|
||||||
static int testAsyncShutdown(
|
static int SQLITE_TCLAPI testAsyncShutdown(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -97,7 +100,7 @@ static Tcl_ThreadCreateType tclWriterThread(ClientData pIsStarted){
|
|||||||
**
|
**
|
||||||
** Start a new writer thread.
|
** Start a new writer thread.
|
||||||
*/
|
*/
|
||||||
static int testAsyncStart(
|
static int SQLITE_TCLAPI testAsyncStart(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -129,7 +132,7 @@ static int testAsyncStart(
|
|||||||
** If the current writer thread is set to run forever then this
|
** If the current writer thread is set to run forever then this
|
||||||
** command would block forever. To prevent that, an error is returned.
|
** command would block forever. To prevent that, an error is returned.
|
||||||
*/
|
*/
|
||||||
static int testAsyncWait(
|
static int SQLITE_TCLAPI testAsyncWait(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -155,7 +158,7 @@ static int testAsyncWait(
|
|||||||
/*
|
/*
|
||||||
** sqlite3async_control OPTION ?VALUE?
|
** sqlite3async_control OPTION ?VALUE?
|
||||||
*/
|
*/
|
||||||
static int testAsyncControl(
|
static int SQLITE_TCLAPI testAsyncControl(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -15,6 +15,9 @@
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#include "sqlite3ext.h"
|
#include "sqlite3ext.h"
|
||||||
|
|
||||||
@@ -91,7 +94,7 @@ static int broken_init(
|
|||||||
**
|
**
|
||||||
** Register the "sqr" extension to be loaded automatically.
|
** Register the "sqr" extension to be loaded automatically.
|
||||||
*/
|
*/
|
||||||
static int autoExtSqrObjCmd(
|
static int SQLITE_TCLAPI autoExtSqrObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -107,7 +110,7 @@ static int autoExtSqrObjCmd(
|
|||||||
**
|
**
|
||||||
** Unregister the "sqr" extension.
|
** Unregister the "sqr" extension.
|
||||||
*/
|
*/
|
||||||
static int cancelAutoExtSqrObjCmd(
|
static int SQLITE_TCLAPI cancelAutoExtSqrObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -123,7 +126,7 @@ static int cancelAutoExtSqrObjCmd(
|
|||||||
**
|
**
|
||||||
** Register the "cube" extension to be loaded automatically.
|
** Register the "cube" extension to be loaded automatically.
|
||||||
*/
|
*/
|
||||||
static int autoExtCubeObjCmd(
|
static int SQLITE_TCLAPI autoExtCubeObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -139,7 +142,7 @@ static int autoExtCubeObjCmd(
|
|||||||
**
|
**
|
||||||
** Unregister the "cube" extension.
|
** Unregister the "cube" extension.
|
||||||
*/
|
*/
|
||||||
static int cancelAutoExtCubeObjCmd(
|
static int SQLITE_TCLAPI cancelAutoExtCubeObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -155,7 +158,7 @@ static int cancelAutoExtCubeObjCmd(
|
|||||||
**
|
**
|
||||||
** Register the broken extension to be loaded automatically.
|
** Register the broken extension to be loaded automatically.
|
||||||
*/
|
*/
|
||||||
static int autoExtBrokenObjCmd(
|
static int SQLITE_TCLAPI autoExtBrokenObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -171,7 +174,7 @@ static int autoExtBrokenObjCmd(
|
|||||||
**
|
**
|
||||||
** Unregister the broken extension.
|
** Unregister the broken extension.
|
||||||
*/
|
*/
|
||||||
static int cancelAutoExtBrokenObjCmd(
|
static int SQLITE_TCLAPI cancelAutoExtBrokenObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -190,7 +193,7 @@ static int cancelAutoExtBrokenObjCmd(
|
|||||||
**
|
**
|
||||||
** Reset all auto-extensions
|
** Reset all auto-extensions
|
||||||
*/
|
*/
|
||||||
static int resetAutoExtObjCmd(
|
static int SQLITE_TCLAPI resetAutoExtObjCmd(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -17,6 +17,9 @@
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -27,7 +30,7 @@ extern const char *sqlite3ErrName(int);
|
|||||||
/* These functions are implemented in test1.c. */
|
/* These functions are implemented in test1.c. */
|
||||||
extern int getDbPointer(Tcl_Interp *, const char *, sqlite3 **);
|
extern int getDbPointer(Tcl_Interp *, const char *, sqlite3 **);
|
||||||
|
|
||||||
static int backupTestCmd(
|
static int SQLITE_TCLAPI backupTestCmd(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -102,7 +105,7 @@ static int backupTestCmd(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void backupTestFinish(ClientData clientData){
|
static void SQLITE_TCLAPI backupTestFinish(ClientData clientData){
|
||||||
sqlite3_backup *pBackup = (sqlite3_backup *)clientData;
|
sqlite3_backup *pBackup = (sqlite3_backup *)clientData;
|
||||||
sqlite3_backup_finish(pBackup);
|
sqlite3_backup_finish(pBackup);
|
||||||
}
|
}
|
||||||
@@ -111,7 +114,7 @@ static void backupTestFinish(ClientData clientData){
|
|||||||
** sqlite3_backup CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME
|
** sqlite3_backup CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
static int backupTestInit(
|
static int SQLITE_TCLAPI backupTestInit(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -567,7 +567,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
|||||||
/*
|
/*
|
||||||
** Register the echo virtual table module.
|
** 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 */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -99,7 +99,7 @@ static char *blobStringFromObj(Tcl_Obj *pObj){
|
|||||||
**
|
**
|
||||||
** Tcl test harness for the sqlite3_blob_open() function.
|
** 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 */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* Calling TCL interpreter */
|
Tcl_Interp *interp, /* Calling TCL interpreter */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -150,7 +150,7 @@ static int test_blob_open(
|
|||||||
/*
|
/*
|
||||||
** sqlite3_blob_close HANDLE
|
** sqlite3_blob_close HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_blob_close(
|
static int SQLITE_TCLAPI test_blob_close(
|
||||||
ClientData clientData, /* Not used */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -178,7 +178,7 @@ static int test_blob_close(
|
|||||||
/*
|
/*
|
||||||
** sqlite3_blob_bytes HANDLE
|
** sqlite3_blob_bytes HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_blob_bytes(
|
static int SQLITE_TCLAPI test_blob_bytes(
|
||||||
ClientData clientData, /* Not used */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
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")
|
** text representation of the returned error code (i.e. "SQLITE_NOMEM")
|
||||||
** and a Tcl exception is thrown.
|
** and a Tcl exception is thrown.
|
||||||
*/
|
*/
|
||||||
static int test_blob_read(
|
static int SQLITE_TCLAPI test_blob_read(
|
||||||
ClientData clientData, /* Not used */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
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
|
** result is set to the text representation of the returned error code
|
||||||
** (i.e. "SQLITE_NOMEM") and a Tcl exception is thrown.
|
** (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 */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
** Return a list of file that are shared and the number of
|
** Return a list of file that are shared and the number of
|
||||||
** references to each file.
|
** references to each file.
|
||||||
*/
|
*/
|
||||||
int sqlite3BtreeSharedCacheReport(
|
int SQLITE_TCLAPI sqlite3BtreeSharedCacheReport(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -645,10 +645,13 @@ sqlite3_vfs *sqlite3_demovfs(void){
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SQLITE_OS_UNIX
|
#if SQLITE_OS_UNIX
|
||||||
static int register_demovfs(
|
static int SQLITE_TCLAPI register_demovfs(
|
||||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -657,7 +660,7 @@ static int register_demovfs(
|
|||||||
sqlite3_vfs_register(sqlite3_demovfs(), 1);
|
sqlite3_vfs_register(sqlite3_demovfs(), 1);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
static int unregister_demovfs(
|
static int SQLITE_TCLAPI unregister_demovfs(
|
||||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -875,7 +875,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
|||||||
/*
|
/*
|
||||||
** Register the echo virtual table module.
|
** 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 */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -693,7 +693,7 @@ static int registerTestFunctions(sqlite3 *db){
|
|||||||
** the standard set of test functions to be loaded into each new
|
** the standard set of test functions to be loaded into each new
|
||||||
** database connection.
|
** database connection.
|
||||||
*/
|
*/
|
||||||
static int autoinstall_test_funcs(
|
static int SQLITE_TCLAPI autoinstall_test_funcs(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -721,7 +721,7 @@ static void tFinal(sqlite3_context *a){}
|
|||||||
** Make various calls to sqlite3_create_function that do not have valid
|
** Make various calls to sqlite3_create_function that do not have valid
|
||||||
** parameters. Verify that the error condition is detected and reported.
|
** parameters. Verify that the error condition is detected and reported.
|
||||||
*/
|
*/
|
||||||
static int abuse_create_function(
|
static int SQLITE_TCLAPI abuse_create_function(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -98,7 +98,7 @@ int sqlite3TestHexToBin(const unsigned char *zIn, int N, unsigned char *aOut){
|
|||||||
** beginning of the file. Convert that information to hexadecimal
|
** beginning of the file. Convert that information to hexadecimal
|
||||||
** and return the resulting HEX string.
|
** and return the resulting HEX string.
|
||||||
*/
|
*/
|
||||||
static int hexio_read(
|
static int SQLITE_TCLAPI hexio_read(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -148,7 +148,7 @@ static int hexio_read(
|
|||||||
** Write DATA into file FILENAME beginning at OFFSET from the
|
** Write DATA into file FILENAME beginning at OFFSET from the
|
||||||
** beginning of the file. DATA is expressed in hexadecimal.
|
** beginning of the file. DATA is expressed in hexadecimal.
|
||||||
*/
|
*/
|
||||||
static int hexio_write(
|
static int SQLITE_TCLAPI hexio_write(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -196,7 +196,7 @@ static int hexio_write(
|
|||||||
** the value of that integer. HEXDATA can contain between 2 and 8
|
** the value of that integer. HEXDATA can contain between 2 and 8
|
||||||
** hexadecimal digits.
|
** hexadecimal digits.
|
||||||
*/
|
*/
|
||||||
static int hexio_get_int(
|
static int SQLITE_TCLAPI hexio_get_int(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -236,7 +236,7 @@ static int hexio_get_int(
|
|||||||
**
|
**
|
||||||
** Render INTEGER has a 16-bit big-endian integer in hexadecimal.
|
** 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,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -263,7 +263,7 @@ static int hexio_render_int16(
|
|||||||
**
|
**
|
||||||
** Render INTEGER has a 32-bit big-endian integer in hexadecimal.
|
** 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,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -293,7 +293,7 @@ static int hexio_render_int32(
|
|||||||
** The UTF8 might not be well-formed. Run this string through
|
** The UTF8 might not be well-formed. Run this string through
|
||||||
** sqlite3Utf8to8() convert it back to hex and return the result.
|
** sqlite3Utf8to8() convert it back to hex and return the result.
|
||||||
*/
|
*/
|
||||||
static int utf8_to_utf8(
|
static int SQLITE_TCLAPI utf8_to_utf8(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
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
|
** Read a varint from the start of BLOB. Set variable VARNAME to contain
|
||||||
** the interpreted value. Return the number of bytes of BLOB consumed.
|
** the interpreted value. Return the number of bytes of BLOB consumed.
|
||||||
*/
|
*/
|
||||||
static int read_fts3varint(
|
static int SQLITE_TCLAPI read_fts3varint(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -188,7 +188,7 @@ static void installInitWrappers(void){
|
|||||||
sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcachemethods);
|
sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcachemethods);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init_wrapper_install(
|
static int SQLITE_TCLAPI init_wrapper_install(
|
||||||
ClientData clientData, /* Unused */
|
ClientData clientData, /* Unused */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -212,7 +212,7 @@ static int init_wrapper_install(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init_wrapper_uninstall(
|
static int SQLITE_TCLAPI init_wrapper_uninstall(
|
||||||
ClientData clientData, /* Unused */
|
ClientData clientData, /* Unused */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -230,7 +230,7 @@ static int init_wrapper_uninstall(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init_wrapper_clear(
|
static int SQLITE_TCLAPI init_wrapper_clear(
|
||||||
ClientData clientData, /* Unused */
|
ClientData clientData, /* Unused */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
@@ -247,7 +247,7 @@ static int init_wrapper_clear(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init_wrapper_query(
|
static int SQLITE_TCLAPI init_wrapper_query(
|
||||||
ClientData clientData, /* Unused */
|
ClientData clientData, /* Unused */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -274,6 +274,9 @@ SQLITE_API int sqlite3_intarray_bind(
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -290,7 +293,7 @@ extern const char *sqlite3ErrName(int);
|
|||||||
** Invoke the sqlite3_intarray_create interface. A string that becomes
|
** Invoke the sqlite3_intarray_create interface. A string that becomes
|
||||||
** the first parameter to sqlite3_intarray_bind.
|
** the first parameter to sqlite3_intarray_bind.
|
||||||
*/
|
*/
|
||||||
static int test_intarray_create(
|
static int SQLITE_TCLAPI test_intarray_create(
|
||||||
ClientData clientData, /* Not used */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
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.
|
** 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 */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -310,7 +310,7 @@ static int textToPointer(const char *z, void **pp){
|
|||||||
**
|
**
|
||||||
** Raw test interface for sqlite3_malloc().
|
** Raw test interface for sqlite3_malloc().
|
||||||
*/
|
*/
|
||||||
static int test_malloc(
|
static int SQLITE_TCLAPI test_malloc(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -335,7 +335,7 @@ static int test_malloc(
|
|||||||
**
|
**
|
||||||
** Raw test interface for sqlite3_realloc().
|
** Raw test interface for sqlite3_realloc().
|
||||||
*/
|
*/
|
||||||
static int test_realloc(
|
static int SQLITE_TCLAPI test_realloc(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -364,7 +364,7 @@ static int test_realloc(
|
|||||||
**
|
**
|
||||||
** Raw test interface for sqlite3_free().
|
** Raw test interface for sqlite3_free().
|
||||||
*/
|
*/
|
||||||
static int test_free(
|
static int SQLITE_TCLAPI test_free(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -395,7 +395,7 @@ int sqlite3TestBinToHex(char*,int);
|
|||||||
** Set a chunk of memory (obtained from malloc, probably) to a
|
** Set a chunk of memory (obtained from malloc, probably) to a
|
||||||
** specified hex pattern.
|
** specified hex pattern.
|
||||||
*/
|
*/
|
||||||
static int test_memset(
|
static int SQLITE_TCLAPI test_memset(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -441,7 +441,7 @@ static int test_memset(
|
|||||||
**
|
**
|
||||||
** Return memory as hexadecimal text.
|
** Return memory as hexadecimal text.
|
||||||
*/
|
*/
|
||||||
static int test_memget(
|
static int SQLITE_TCLAPI test_memget(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -488,7 +488,7 @@ static int test_memget(
|
|||||||
**
|
**
|
||||||
** Raw test interface for sqlite3_memory_used().
|
** Raw test interface for sqlite3_memory_used().
|
||||||
*/
|
*/
|
||||||
static int test_memory_used(
|
static int SQLITE_TCLAPI test_memory_used(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -503,7 +503,7 @@ static int test_memory_used(
|
|||||||
**
|
**
|
||||||
** Raw test interface for sqlite3_memory_highwater().
|
** Raw test interface for sqlite3_memory_highwater().
|
||||||
*/
|
*/
|
||||||
static int test_memory_highwater(
|
static int SQLITE_TCLAPI test_memory_highwater(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -528,7 +528,7 @@ static int test_memory_highwater(
|
|||||||
** Set the depth of backtracing. If SQLITE_MEMDEBUG is not defined
|
** Set the depth of backtracing. If SQLITE_MEMDEBUG is not defined
|
||||||
** then this routine is a no-op.
|
** then this routine is a no-op.
|
||||||
*/
|
*/
|
||||||
static int test_memdebug_backtrace(
|
static int SQLITE_TCLAPI test_memdebug_backtrace(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -554,7 +554,7 @@ static int test_memdebug_backtrace(
|
|||||||
**
|
**
|
||||||
** Write a summary of unfreed memory to FILENAME.
|
** Write a summary of unfreed memory to FILENAME.
|
||||||
*/
|
*/
|
||||||
static int test_memdebug_dump(
|
static int SQLITE_TCLAPI test_memdebug_dump(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -579,7 +579,7 @@ static int test_memdebug_dump(
|
|||||||
**
|
**
|
||||||
** Return the total number of times malloc() has been called.
|
** 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,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -619,7 +619,7 @@ static int test_memdebug_malloc_count(
|
|||||||
**
|
**
|
||||||
** To disable simulated failures, use a COUNTER of -1.
|
** To disable simulated failures, use a COUNTER of -1.
|
||||||
*/
|
*/
|
||||||
static int test_memdebug_fail(
|
static int SQLITE_TCLAPI test_memdebug_fail(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -685,7 +685,7 @@ static int test_memdebug_fail(
|
|||||||
** simulated failure occurs. A negative return value indicates that
|
** simulated failure occurs. A negative return value indicates that
|
||||||
** no malloc() failure is scheduled.
|
** no malloc() failure is scheduled.
|
||||||
*/
|
*/
|
||||||
static int test_memdebug_pending(
|
static int SQLITE_TCLAPI test_memdebug_pending(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -718,7 +718,7 @@ static int sqlite3_memdebug_title_count = 0;
|
|||||||
**
|
**
|
||||||
** Each title overwrite the previous.
|
** Each title overwrite the previous.
|
||||||
*/
|
*/
|
||||||
static int test_memdebug_settitle(
|
static int SQLITE_TCLAPI test_memdebug_settitle(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -799,7 +799,7 @@ static void test_memdebug_log_clear(void){
|
|||||||
Tcl_InitHashTable(&aMallocLog, MALLOC_LOG_KEYINTS);
|
Tcl_InitHashTable(&aMallocLog, MALLOC_LOG_KEYINTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_memdebug_log(
|
static int SQLITE_TCLAPI test_memdebug_log(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -897,7 +897,7 @@ static int test_memdebug_log(
|
|||||||
**
|
**
|
||||||
** A negative SIZE causes the buffer pointer to be NULL.
|
** A negative SIZE causes the buffer pointer to be NULL.
|
||||||
*/
|
*/
|
||||||
static int test_config_scratch(
|
static int SQLITE_TCLAPI test_config_scratch(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -937,7 +937,7 @@ static int test_config_scratch(
|
|||||||
**
|
**
|
||||||
** A negative SIZE causes the buffer pointer to be NULL.
|
** A negative SIZE causes the buffer pointer to be NULL.
|
||||||
*/
|
*/
|
||||||
static int test_config_pagecache(
|
static int SQLITE_TCLAPI test_config_pagecache(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -980,7 +980,7 @@ static int test_config_pagecache(
|
|||||||
** is certainty. 0 is never. PRNG_SEED is the pseudo-random number generator
|
** is certainty. 0 is never. PRNG_SEED is the pseudo-random number generator
|
||||||
** seed.
|
** seed.
|
||||||
*/
|
*/
|
||||||
static int test_alt_pcache(
|
static int SQLITE_TCLAPI test_alt_pcache(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1021,7 +1021,7 @@ static int test_alt_pcache(
|
|||||||
**
|
**
|
||||||
** Enable or disable memory status reporting using SQLITE_CONFIG_MEMSTATUS.
|
** Enable or disable memory status reporting using SQLITE_CONFIG_MEMSTATUS.
|
||||||
*/
|
*/
|
||||||
static int test_config_memstatus(
|
static int SQLITE_TCLAPI test_config_memstatus(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1042,7 +1042,7 @@ static int test_config_memstatus(
|
|||||||
** Usage: sqlite3_config_lookaside SIZE COUNT
|
** Usage: sqlite3_config_lookaside SIZE COUNT
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
static int test_config_lookaside(
|
static int SQLITE_TCLAPI test_config_lookaside(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
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
|
** 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.
|
** 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,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1111,7 +1111,7 @@ static int test_db_config_lookaside(
|
|||||||
/*
|
/*
|
||||||
** Usage: sqlite3_config_heap NBYTE NMINALLOC
|
** Usage: sqlite3_config_heap NBYTE NMINALLOC
|
||||||
*/
|
*/
|
||||||
static int test_config_heap(
|
static int SQLITE_TCLAPI test_config_heap(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1148,7 +1148,7 @@ static int test_config_heap(
|
|||||||
/*
|
/*
|
||||||
** Usage: sqlite3_config_heap_size NBYTE
|
** Usage: sqlite3_config_heap_size NBYTE
|
||||||
*/
|
*/
|
||||||
static int test_config_heap_size(
|
static int SQLITE_TCLAPI test_config_heap_size(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1178,7 +1178,7 @@ static int test_config_heap_size(
|
|||||||
** Invoke sqlite3_config() or sqlite3_db_config() with invalid
|
** Invoke sqlite3_config() or sqlite3_db_config() with invalid
|
||||||
** opcodes and verify that they return errors.
|
** opcodes and verify that they return errors.
|
||||||
*/
|
*/
|
||||||
static int test_config_error(
|
static int SQLITE_TCLAPI test_config_error(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1216,7 +1216,7 @@ static int test_config_error(
|
|||||||
** Enables or disables interpretation of URI parameters by default using
|
** Enables or disables interpretation of URI parameters by default using
|
||||||
** SQLITE_CONFIG_URI.
|
** SQLITE_CONFIG_URI.
|
||||||
*/
|
*/
|
||||||
static int test_config_uri(
|
static int SQLITE_TCLAPI test_config_uri(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1245,7 +1245,7 @@ static int test_config_uri(
|
|||||||
** Enables or disables the use of the covering-index scan optimization.
|
** Enables or disables the use of the covering-index scan optimization.
|
||||||
** SQLITE_CONFIG_COVERING_INDEX_SCAN.
|
** SQLITE_CONFIG_COVERING_INDEX_SCAN.
|
||||||
*/
|
*/
|
||||||
static int test_config_cis(
|
static int SQLITE_TCLAPI test_config_cis(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1273,7 +1273,7 @@ static int test_config_cis(
|
|||||||
**
|
**
|
||||||
** Set the minimum PMA size.
|
** Set the minimum PMA size.
|
||||||
*/
|
*/
|
||||||
static int test_config_pmasz(
|
static int SQLITE_TCLAPI test_config_pmasz(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1303,7 +1303,7 @@ static int test_config_pmasz(
|
|||||||
**
|
**
|
||||||
** Write a summary of unfreed memsys3 allocations to FILENAME.
|
** Write a summary of unfreed memsys3 allocations to FILENAME.
|
||||||
*/
|
*/
|
||||||
static int test_dump_memsys3(
|
static int SQLITE_TCLAPI test_dump_memsys3(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1339,7 +1339,7 @@ static int test_dump_memsys3(
|
|||||||
** Return a list of three elements which are the sqlite3_status() return
|
** Return a list of three elements which are the sqlite3_status() return
|
||||||
** code, the current value, and the high-water mark value.
|
** code, the current value, and the high-water mark value.
|
||||||
*/
|
*/
|
||||||
static int test_status(
|
static int SQLITE_TCLAPI test_status(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1396,7 +1396,7 @@ static int test_status(
|
|||||||
** Return a list of three elements which are the sqlite3_db_status() return
|
** Return a list of three elements which are the sqlite3_db_status() return
|
||||||
** code, the current value, and the high-water mark value.
|
** code, the current value, and the high-water mark value.
|
||||||
*/
|
*/
|
||||||
static int test_db_status(
|
static int SQLITE_TCLAPI test_db_status(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1457,7 +1457,7 @@ static int test_db_status(
|
|||||||
/*
|
/*
|
||||||
** install_malloc_faultsim BOOLEAN
|
** install_malloc_faultsim BOOLEAN
|
||||||
*/
|
*/
|
||||||
static int test_install_malloc_faultsim(
|
static int SQLITE_TCLAPI test_install_malloc_faultsim(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1481,7 +1481,7 @@ static int test_install_malloc_faultsim(
|
|||||||
/*
|
/*
|
||||||
** sqlite3_install_memsys3
|
** sqlite3_install_memsys3
|
||||||
*/
|
*/
|
||||||
static int test_install_memsys3(
|
static int SQLITE_TCLAPI test_install_memsys3(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1496,7 +1496,7 @@ static int test_install_memsys3(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_vfs_oom_test(
|
static int SQLITE_TCLAPI test_vfs_oom_test(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -1233,6 +1233,9 @@ int sqlite3_multiplex_shutdown(int eForce){
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
extern const char *sqlite3ErrName(int);
|
extern const char *sqlite3ErrName(int);
|
||||||
|
|
||||||
@@ -1240,7 +1243,7 @@ extern const char *sqlite3ErrName(int);
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_multiplex_initialize NAME MAKEDEFAULT
|
** tclcmd: sqlite3_multiplex_initialize NAME MAKEDEFAULT
|
||||||
*/
|
*/
|
||||||
static int test_multiplex_initialize(
|
static int SQLITE_TCLAPI test_multiplex_initialize(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1271,7 +1274,7 @@ static int test_multiplex_initialize(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_multiplex_shutdown
|
** tclcmd: sqlite3_multiplex_shutdown
|
||||||
*/
|
*/
|
||||||
static int test_multiplex_shutdown(
|
static int SQLITE_TCLAPI test_multiplex_shutdown(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1299,7 +1302,7 @@ static int test_multiplex_shutdown(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_multiplex_dump
|
** tclcmd: sqlite3_multiplex_dump
|
||||||
*/
|
*/
|
||||||
static int test_multiplex_dump(
|
static int SQLITE_TCLAPI test_multiplex_dump(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1354,7 +1357,7 @@ static int test_multiplex_dump(
|
|||||||
/*
|
/*
|
||||||
** Tclcmd: test_multiplex_control HANDLE DBNAME SUB-COMMAND ?INT-VALUE?
|
** Tclcmd: test_multiplex_control HANDLE DBNAME SUB-COMMAND ?INT-VALUE?
|
||||||
*/
|
*/
|
||||||
static int test_multiplex_control(
|
static int SQLITE_TCLAPI test_multiplex_control(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -156,7 +156,7 @@ static void counterMutexLeave(sqlite3_mutex *p){
|
|||||||
/*
|
/*
|
||||||
** sqlite3_shutdown
|
** sqlite3_shutdown
|
||||||
*/
|
*/
|
||||||
static int test_shutdown(
|
static int SQLITE_TCLAPI test_shutdown(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -177,7 +177,7 @@ static int test_shutdown(
|
|||||||
/*
|
/*
|
||||||
** sqlite3_initialize
|
** sqlite3_initialize
|
||||||
*/
|
*/
|
||||||
static int test_initialize(
|
static int SQLITE_TCLAPI test_initialize(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -198,7 +198,7 @@ static int test_initialize(
|
|||||||
/*
|
/*
|
||||||
** install_mutex_counters BOOLEAN
|
** install_mutex_counters BOOLEAN
|
||||||
*/
|
*/
|
||||||
static int test_install_mutex_counters(
|
static int SQLITE_TCLAPI test_install_mutex_counters(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -259,7 +259,7 @@ static int test_install_mutex_counters(
|
|||||||
/*
|
/*
|
||||||
** read_mutex_counters
|
** read_mutex_counters
|
||||||
*/
|
*/
|
||||||
static int test_read_mutex_counters(
|
static int SQLITE_TCLAPI test_read_mutex_counters(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -288,7 +288,7 @@ static int test_read_mutex_counters(
|
|||||||
/*
|
/*
|
||||||
** clear_mutex_counters
|
** clear_mutex_counters
|
||||||
*/
|
*/
|
||||||
static int test_clear_mutex_counters(
|
static int SQLITE_TCLAPI test_clear_mutex_counters(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -312,7 +312,7 @@ static int test_clear_mutex_counters(
|
|||||||
** will be invalid since the mutex has already been freed. The
|
** will be invalid since the mutex has already been freed. The
|
||||||
** return pointer just checks to see if the mutex really was allocated.
|
** 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,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -339,7 +339,7 @@ static int test_alloc_mutex(
|
|||||||
**
|
**
|
||||||
** Or OPTION can be an raw integer.
|
** Or OPTION can be an raw integer.
|
||||||
*/
|
*/
|
||||||
static int test_config(
|
static int SQLITE_TCLAPI test_config(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -401,7 +401,7 @@ static sqlite3_mutex *getStaticMutexPointer(
|
|||||||
return counterMutexAlloc(iMutex);
|
return counterMutexAlloc(iMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_enter_static_mutex(
|
static int SQLITE_TCLAPI test_enter_static_mutex(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -420,7 +420,7 @@ static int test_enter_static_mutex(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_leave_static_mutex(
|
static int SQLITE_TCLAPI test_leave_static_mutex(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -439,7 +439,7 @@ static int test_leave_static_mutex(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_enter_db_mutex(
|
static int SQLITE_TCLAPI test_enter_db_mutex(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -458,7 +458,7 @@ static int test_enter_db_mutex(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_leave_db_mutex(
|
static int SQLITE_TCLAPI test_leave_db_mutex(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -1108,9 +1108,12 @@ int sqlite3_vfslog_register(sqlite3 *db){
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int test_vfslog(
|
static int SQLITE_TCLAPI test_vfslog(
|
||||||
void *clientData,
|
void *clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -111,7 +111,7 @@ struct quotaFile {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
** An instance of the following object represents each open connection
|
** 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
|
** subclass of sqlite3_file. The sqlite3_file object for the underlying
|
||||||
** VFS is appended to this structure.
|
** VFS is appended to this structure.
|
||||||
*/
|
*/
|
||||||
@@ -154,11 +154,11 @@ static struct {
|
|||||||
*/
|
*/
|
||||||
sqlite3_vfs sThisVfs;
|
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
|
** associated with this shim. It is initialized at start-time and does
|
||||||
** not require a mutex.
|
** 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
|
** 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
|
** 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
|
** 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 quotaEnter(void){ sqlite3_mutex_enter(gQuota.pMutex); }
|
||||||
static void quotaLeave(void){ sqlite3_mutex_leave(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){
|
static int quotaGroupOpenFileCount(quotaGroup *pGroup){
|
||||||
int N = 0;
|
int N = 0;
|
||||||
@@ -399,7 +399,7 @@ static char *quota_utf8_to_mbcs(const char *zUtf8){
|
|||||||
return zMbcs;
|
return zMbcs;
|
||||||
#else
|
#else
|
||||||
return (char*)zUtf8; /* No-op on unix */
|
return (char*)zUtf8; /* No-op on unix */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -410,7 +410,7 @@ static void quota_mbcs_free(char *zOld){
|
|||||||
sqlite3_free(zOld);
|
sqlite3_free(zOld);
|
||||||
#else
|
#else
|
||||||
/* No-op on unix */
|
/* No-op on unix */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************* VFS Method Wrappers *****************************/
|
/************************* VFS Method Wrappers *****************************/
|
||||||
@@ -428,7 +428,7 @@ static int quotaOpen(
|
|||||||
int flags, /* Flags to control the opening */
|
int flags, /* Flags to control the opening */
|
||||||
int *pOutFlags /* Flags showing results of opening */
|
int *pOutFlags /* Flags showing results of opening */
|
||||||
){
|
){
|
||||||
int rc; /* Result code */
|
int rc; /* Result code */
|
||||||
quotaConn *pQuotaOpen; /* The new quota file descriptor */
|
quotaConn *pQuotaOpen; /* The new quota file descriptor */
|
||||||
quotaFile *pFile; /* Corresponding quotaFile obj */
|
quotaFile *pFile; /* Corresponding quotaFile obj */
|
||||||
quotaGroup *pGroup; /* The group file belongs to */
|
quotaGroup *pGroup; /* The group file belongs to */
|
||||||
@@ -488,7 +488,7 @@ static int quotaDelete(
|
|||||||
const char *zName, /* Name of file to be deleted */
|
const char *zName, /* Name of file to be deleted */
|
||||||
int syncDir /* Do a directory sync after deleting */
|
int syncDir /* Do a directory sync after deleting */
|
||||||
){
|
){
|
||||||
int rc; /* Result code */
|
int rc; /* Result code */
|
||||||
quotaFile *pFile; /* Files in the quota */
|
quotaFile *pFile; /* Files in the quota */
|
||||||
quotaGroup *pGroup; /* The group file belongs to */
|
quotaGroup *pGroup; /* The group file belongs to */
|
||||||
sqlite3_vfs *pOrigVfs = gQuota.pOrigVfs; /* Real VFS */
|
sqlite3_vfs *pOrigVfs = gQuota.pOrigVfs; /* Real VFS */
|
||||||
@@ -581,7 +581,7 @@ static int quotaWrite(
|
|||||||
szNew = pGroup->iSize - pFile->iSize + iEnd;
|
szNew = pGroup->iSize - pFile->iSize + iEnd;
|
||||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
||||||
if( pGroup->xCallback ){
|
if( pGroup->xCallback ){
|
||||||
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
||||||
pGroup->pArg);
|
pGroup->pArg);
|
||||||
}
|
}
|
||||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
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
|
** Initialize the quota VFS shim. Use the VFS named zOrigVfsName
|
||||||
** as the VFS that does the actual work. Use the default if
|
** 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
|
** The quota VFS shim is named "quota". It will become the default
|
||||||
** VFS if makeDefault is non-zero.
|
** VFS if makeDefault is non-zero.
|
||||||
@@ -908,7 +908,7 @@ int sqlite3_quota_file(const char *zFilename){
|
|||||||
|
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
zFull[strlen(zFull)+1] = '\0';
|
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);
|
SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_DB, &outFlags);
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
fd->pMethods->xFileSize(fd, &iSize);
|
fd->pMethods->xFileSize(fd, &iSize);
|
||||||
@@ -1016,7 +1016,7 @@ size_t sqlite3_quota_fwrite(
|
|||||||
szNew = pGroup->iSize - pFile->iSize + iEnd;
|
szNew = pGroup->iSize - pFile->iSize + iEnd;
|
||||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
||||||
if( pGroup->xCallback ){
|
if( pGroup->xCallback ){
|
||||||
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
||||||
pGroup->pArg);
|
pGroup->pArg);
|
||||||
}
|
}
|
||||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
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){
|
sqlite3_int64 sqlite3_quota_file_size(quota_FILE *p){
|
||||||
return p->pFile ? p->pFile->iSize : -1;
|
return p->pFile ? p->pFile->iSize : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Determine the amount of data in bytes available for reading
|
** Determine the amount of data in bytes available for reading
|
||||||
** in the given file.
|
** in the given file.
|
||||||
@@ -1275,13 +1275,16 @@ int sqlite3_quota_remove(const char *zFilename){
|
|||||||
sqlite3_free(zFull);
|
sqlite3_free(zFull);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************** Test Code ***********************************/
|
/***************************** Test Code ***********************************/
|
||||||
#ifdef SQLITE_TEST
|
#ifdef SQLITE_TEST
|
||||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1354,7 +1357,7 @@ static void tclCallbackDestructor(void *pObj){
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_initialize NAME MAKEDEFAULT
|
** tclcmd: sqlite3_quota_initialize NAME MAKEDEFAULT
|
||||||
*/
|
*/
|
||||||
static int test_quota_initialize(
|
static int SQLITE_TCLAPI test_quota_initialize(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1383,7 +1386,7 @@ static int test_quota_initialize(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_shutdown
|
** tclcmd: sqlite3_quota_shutdown
|
||||||
*/
|
*/
|
||||||
static int test_quota_shutdown(
|
static int SQLITE_TCLAPI test_quota_shutdown(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1406,7 +1409,7 @@ static int test_quota_shutdown(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_set PATTERN LIMIT SCRIPT
|
** tclcmd: sqlite3_quota_set PATTERN LIMIT SCRIPT
|
||||||
*/
|
*/
|
||||||
static int test_quota_set(
|
static int SQLITE_TCLAPI test_quota_set(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1460,7 +1463,7 @@ static int test_quota_set(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_file FILENAME
|
** tclcmd: sqlite3_quota_file FILENAME
|
||||||
*/
|
*/
|
||||||
static int test_quota_file(
|
static int SQLITE_TCLAPI test_quota_file(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1486,7 +1489,7 @@ static int test_quota_file(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_dump
|
** tclcmd: sqlite3_quota_dump
|
||||||
*/
|
*/
|
||||||
static int test_quota_dump(
|
static int SQLITE_TCLAPI test_quota_dump(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1534,7 +1537,7 @@ static int test_quota_dump(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_fopen FILENAME MODE
|
** tclcmd: sqlite3_quota_fopen FILENAME MODE
|
||||||
*/
|
*/
|
||||||
static int test_quota_fopen(
|
static int SQLITE_TCLAPI test_quota_fopen(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1564,7 +1567,7 @@ extern void *sqlite3TestTextToPtr(const char*);
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_fread HANDLE SIZE NELEM
|
** tclcmd: sqlite3_quota_fread HANDLE SIZE NELEM
|
||||||
*/
|
*/
|
||||||
static int test_quota_fread(
|
static int SQLITE_TCLAPI test_quota_fread(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1598,7 +1601,7 @@ static int test_quota_fread(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_fwrite HANDLE SIZE NELEM CONTENT
|
** tclcmd: sqlite3_quota_fwrite HANDLE SIZE NELEM CONTENT
|
||||||
*/
|
*/
|
||||||
static int test_quota_fwrite(
|
static int SQLITE_TCLAPI test_quota_fwrite(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1626,7 +1629,7 @@ static int test_quota_fwrite(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_fclose HANDLE
|
** tclcmd: sqlite3_quota_fclose HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_quota_fclose(
|
static int SQLITE_TCLAPI test_quota_fclose(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1648,7 +1651,7 @@ static int test_quota_fclose(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_fflush HANDLE ?HARDSYNC?
|
** tclcmd: sqlite3_quota_fflush HANDLE ?HARDSYNC?
|
||||||
*/
|
*/
|
||||||
static int test_quota_fflush(
|
static int SQLITE_TCLAPI test_quota_fflush(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1674,7 +1677,7 @@ static int test_quota_fflush(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_fseek HANDLE OFFSET WHENCE
|
** tclcmd: sqlite3_quota_fseek HANDLE OFFSET WHENCE
|
||||||
*/
|
*/
|
||||||
static int test_quota_fseek(
|
static int SQLITE_TCLAPI test_quota_fseek(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1712,7 +1715,7 @@ static int test_quota_fseek(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_rewind HANDLE
|
** tclcmd: sqlite3_quota_rewind HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_quota_rewind(
|
static int SQLITE_TCLAPI test_quota_rewind(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1731,7 +1734,7 @@ static int test_quota_rewind(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_ftell HANDLE
|
** tclcmd: sqlite3_quota_ftell HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_quota_ftell(
|
static int SQLITE_TCLAPI test_quota_ftell(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1752,7 +1755,7 @@ static int test_quota_ftell(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_ftruncate HANDLE SIZE
|
** tclcmd: sqlite3_quota_ftruncate HANDLE SIZE
|
||||||
*/
|
*/
|
||||||
static int test_quota_ftruncate(
|
static int SQLITE_TCLAPI test_quota_ftruncate(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1777,7 +1780,7 @@ static int test_quota_ftruncate(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_file_size HANDLE
|
** tclcmd: sqlite3_quota_file_size HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_quota_file_size(
|
static int SQLITE_TCLAPI test_quota_file_size(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1798,7 +1801,7 @@ static int test_quota_file_size(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_file_truesize HANDLE
|
** tclcmd: sqlite3_quota_file_truesize HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_quota_file_truesize(
|
static int SQLITE_TCLAPI test_quota_file_truesize(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1819,7 +1822,7 @@ static int test_quota_file_truesize(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_file_mtime HANDLE
|
** tclcmd: sqlite3_quota_file_mtime HANDLE
|
||||||
*/
|
*/
|
||||||
static int test_quota_file_mtime(
|
static int SQLITE_TCLAPI test_quota_file_mtime(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1842,7 +1845,7 @@ static int test_quota_file_mtime(
|
|||||||
/*
|
/*
|
||||||
** tclcmd: sqlite3_quota_remove FILENAME
|
** tclcmd: sqlite3_quota_remove FILENAME
|
||||||
*/
|
*/
|
||||||
static int test_quota_remove(
|
static int SQLITE_TCLAPI test_quota_remove(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1866,7 +1869,7 @@ static int test_quota_remove(
|
|||||||
** Test the glob pattern matching. Return 1 if TEXT matches PATTERN
|
** Test the glob pattern matching. Return 1 if TEXT matches PATTERN
|
||||||
** and return 0 if it does not.
|
** and return 0 if it does not.
|
||||||
*/
|
*/
|
||||||
static int test_quota_glob(
|
static int SQLITE_TCLAPI test_quota_glob(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
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
|
** Return the number of bytes from the current file point to the end of
|
||||||
** the file.
|
** the file.
|
||||||
*/
|
*/
|
||||||
static int test_quota_file_available(
|
static int SQLITE_TCLAPI test_quota_file_available(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1915,7 +1918,7 @@ static int test_quota_file_available(
|
|||||||
**
|
**
|
||||||
** Return true if the file handle is in the error state.
|
** 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,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -440,7 +440,7 @@ static int cube_geom(
|
|||||||
}
|
}
|
||||||
#endif /* SQLITE_ENABLE_RTREE */
|
#endif /* SQLITE_ENABLE_RTREE */
|
||||||
|
|
||||||
static int register_cube_geom(
|
static int SQLITE_TCLAPI register_cube_geom(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -468,7 +468,7 @@ static int register_cube_geom(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int register_circle_geom(
|
static int SQLITE_TCLAPI register_circle_geom(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -306,7 +306,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
|||||||
/*
|
/*
|
||||||
** Register the schema virtual table module.
|
** Register the schema virtual table module.
|
||||||
*/
|
*/
|
||||||
static int register_schema_module(
|
static int SQLITE_TCLAPI register_schema_module(
|
||||||
ClientData clientData, /* Not used */
|
ClientData clientData, /* Not used */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -260,6 +260,9 @@ int sqlite3demo_superlock(
|
|||||||
# include "sqlite_tcl.h"
|
# include "sqlite_tcl.h"
|
||||||
#else
|
#else
|
||||||
# include "tcl.h"
|
# include "tcl.h"
|
||||||
|
# ifndef SQLITE_TCLAPI
|
||||||
|
# define SQLITE_TCLAPI
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct InterpAndScript {
|
struct InterpAndScript {
|
||||||
@@ -268,11 +271,11 @@ struct InterpAndScript {
|
|||||||
};
|
};
|
||||||
typedef struct InterpAndScript InterpAndScript;
|
typedef struct InterpAndScript InterpAndScript;
|
||||||
|
|
||||||
static void superunlock_del(ClientData cd){
|
static void SQLITE_TCLAPI superunlock_del(ClientData cd){
|
||||||
sqlite3demo_superunlock((void *)cd);
|
sqlite3demo_superunlock((void *)cd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int superunlock_cmd(
|
static int SQLITE_TCLAPI superunlock_cmd(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -304,7 +307,7 @@ static int superlock_busy(void *pCtx, int nBusy){
|
|||||||
/*
|
/*
|
||||||
** Tclcmd: sqlite3demo_superlock CMDNAME PATH VFS BUSY-HANDLER-SCRIPT
|
** Tclcmd: sqlite3demo_superlock CMDNAME PATH VFS BUSY-HANDLER-SCRIPT
|
||||||
*/
|
*/
|
||||||
static int superlock_cmd(
|
static int SQLITE_TCLAPI superlock_cmd(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -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);
|
return orig_mremap(a, b, c, d, pArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_install(
|
static int SQLITE_TCLAPI test_syscall_install(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -458,7 +458,7 @@ static int test_syscall_install(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_uninstall(
|
static int SQLITE_TCLAPI test_syscall_uninstall(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -482,7 +482,7 @@ static int test_syscall_uninstall(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_reset(
|
static int SQLITE_TCLAPI test_syscall_reset(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -520,7 +520,7 @@ static int test_syscall_reset(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_exists(
|
static int SQLITE_TCLAPI test_syscall_exists(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -541,7 +541,7 @@ static int test_syscall_exists(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_fault(
|
static int SQLITE_TCLAPI test_syscall_fault(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -570,7 +570,7 @@ static int test_syscall_fault(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_errno(
|
static int SQLITE_TCLAPI test_syscall_errno(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -616,7 +616,7 @@ static int test_syscall_errno(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_list(
|
static int SQLITE_TCLAPI test_syscall_list(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -646,7 +646,7 @@ static int test_syscall_list(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_defaultvfs(
|
static int SQLITE_TCLAPI test_syscall_defaultvfs(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -668,7 +668,7 @@ static int ts_getpagesize(void){
|
|||||||
return gSyscall.pgsz;
|
return gSyscall.pgsz;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall_pagesize(
|
static int SQLITE_TCLAPI test_syscall_pagesize(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -703,7 +703,7 @@ static int test_syscall_pagesize(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_syscall(
|
static int SQLITE_TCLAPI test_syscall(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -411,7 +411,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
|||||||
/*
|
/*
|
||||||
** Register the echo virtual table module.
|
** 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 */
|
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||||
int objc, /* Number of arguments */
|
int objc, /* Number of arguments */
|
||||||
|
@@ -76,7 +76,7 @@ extern int sqlite3TestErrCode(Tcl_Interp *, sqlite3 *, int);
|
|||||||
/*
|
/*
|
||||||
** Handler for events of type EvalEvent.
|
** 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;
|
int rc;
|
||||||
EvalEvent *p = (EvalEvent *)evPtr;
|
EvalEvent *p = (EvalEvent *)evPtr;
|
||||||
rc = Tcl_Eval(p->interp, p->zScript);
|
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].
|
** The caller can wait for the script to terminate using [vwait VARNAME].
|
||||||
*/
|
*/
|
||||||
static int sqlthread_spawn(
|
static int SQLITE_TCLAPI sqlthread_spawn(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -224,7 +224,7 @@ static int sqlthread_spawn(
|
|||||||
**
|
**
|
||||||
** NOTE: At the moment, this doesn't work. FIXME.
|
** NOTE: At the moment, this doesn't work. FIXME.
|
||||||
*/
|
*/
|
||||||
static int sqlthread_parent(
|
static int SQLITE_TCLAPI sqlthread_parent(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -269,7 +269,7 @@ static int xBusy(void *pArg, int nBusy){
|
|||||||
** Open a database handle and return the string representation of
|
** Open a database handle and return the string representation of
|
||||||
** the pointer value.
|
** the pointer value.
|
||||||
*/
|
*/
|
||||||
static int sqlthread_open(
|
static int SQLITE_TCLAPI sqlthread_open(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -319,7 +319,7 @@ static int sqlthread_open(
|
|||||||
** Return the current thread-id (Tcl_GetCurrentThread()) cast to
|
** Return the current thread-id (Tcl_GetCurrentThread()) cast to
|
||||||
** an integer.
|
** an integer.
|
||||||
*/
|
*/
|
||||||
static int sqlthread_id(
|
static int SQLITE_TCLAPI sqlthread_id(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -337,7 +337,7 @@ static int sqlthread_id(
|
|||||||
/*
|
/*
|
||||||
** Dispatch routine for the sub-commands of [sqlthread].
|
** Dispatch routine for the sub-commands of [sqlthread].
|
||||||
*/
|
*/
|
||||||
static int sqlthread_proc(
|
static int SQLITE_TCLAPI sqlthread_proc(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -385,7 +385,7 @@ static int sqlthread_proc(
|
|||||||
** implemented as a script in Tcl 8.5, it is not usually available to
|
** implemented as a script in Tcl 8.5, it is not usually available to
|
||||||
** testfixture.
|
** testfixture.
|
||||||
*/
|
*/
|
||||||
static int clock_seconds_proc(
|
static int SQLITE_TCLAPI clock_seconds_proc(
|
||||||
ClientData clientData,
|
ClientData clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -547,7 +547,7 @@ int sqlite3_blocking_prepare_v2(
|
|||||||
**
|
**
|
||||||
** Advance the statement to the next row.
|
** Advance the statement to the next row.
|
||||||
*/
|
*/
|
||||||
static int blocking_step_proc(
|
static int SQLITE_TCLAPI blocking_step_proc(
|
||||||
void * clientData,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -573,7 +573,7 @@ static int blocking_step_proc(
|
|||||||
** Usage: sqlite3_blocking_prepare_v2 DB sql bytes ?tailvar?
|
** Usage: sqlite3_blocking_prepare_v2 DB sql bytes ?tailvar?
|
||||||
** Usage: sqlite3_nonblocking_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,
|
void * clientData,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
@@ -1040,7 +1040,7 @@ static int tvfsUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *p){
|
|||||||
return sqlite3OsUnfetch(pFd->pReal, iOfst, p);
|
return sqlite3OsUnfetch(pFd->pReal, iOfst, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int testvfs_obj_cmd(
|
static int SQLITE_TCLAPI testvfs_obj_cmd(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
@@ -1352,7 +1352,7 @@ static int testvfs_obj_cmd(
|
|||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void testvfs_obj_del(ClientData cd){
|
static void SQLITE_TCLAPI testvfs_obj_del(ClientData cd){
|
||||||
Testvfs *p = (Testvfs *)cd;
|
Testvfs *p = (Testvfs *)cd;
|
||||||
if( p->pScript ) Tcl_DecrRefCount(p->pScript);
|
if( p->pScript ) Tcl_DecrRefCount(p->pScript);
|
||||||
sqlite3_vfs_unregister(p->pVfs);
|
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"
|
** where LOCK is of the form "OFFSET NBYTE lock/unlock shared/exclusive"
|
||||||
*/
|
*/
|
||||||
static int testvfs_cmd(
|
static int SQLITE_TCLAPI testvfs_cmd(
|
||||||
ClientData cd,
|
ClientData cd,
|
||||||
Tcl_Interp *interp,
|
Tcl_Interp *interp,
|
||||||
int objc,
|
int objc,
|
||||||
|
Reference in New Issue
Block a user