diff options
author | drh <> | 2024-07-31 10:59:19 +0000 |
---|---|---|
committer | drh <> | 2024-07-31 10:59:19 +0000 |
commit | e388fc7367f4752c6b23b28154654ca39adaf009 (patch) | |
tree | c4456a2c120299682b1cd2eb0b2105d1d4329de9 /src/tclsqlite.c | |
parent | 4400b0ac45840d17cb5fca1ba4d173fa3982002b (diff) | |
download | sqlite-e388fc7367f4752c6b23b28154654ca39adaf009.tar.gz sqlite-e388fc7367f4752c6b23b28154654ca39adaf009.zip |
Fixes to tclsqlite.c to facilitate TEA installs.
FossilOrigin-Name: 7157c3c910565c9385a028793a0c0106c5064ab6a8a6efbe29dd1f1cdb2bd48d
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 76e670160..55084687a 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -35,7 +35,23 @@ # include "msvc.h" #endif -#include "tclsqlite.h" +/****** Copy of tclsqlite.h ******/ +#if defined(INCLUDE_SQLITE_TCL_H) +# include "sqlite_tcl.h" /* Special case for Windows using STDCALL */ +#else +# include "tcl.h" /* All normal cases */ +# ifndef SQLITE_TCLAPI +# define SQLITE_TCLAPI +# endif +#endif +/* Compatability between Tcl8.6 and Tcl9.0 */ +#if TCL_MAJOR_VERSION==9 +# define CONST const +#else + typedef int Tcl_Size; +#endif +/**** End copy of tclsqlite.h ****/ + #include <errno.h> /* @@ -3997,6 +4013,11 @@ EXTERN int Tclsqlite_Unload(Tcl_Interp *interp, int flags){ return TCL_OK; } EXTERN int Sqlite_SafeInit(Tcl_Interp *interp){ return TCL_ERROR; } EXTERN int Sqlite_SafeUnload(Tcl_Interp *interp, int flags){return TCL_ERROR;} +/* Also variants with a lowercase "s" */ +EXTERN int sqlite3_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp);} +EXTERN int sqlite_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp);} + + /* ** If the TCLSH macro is defined, add code to make a stand-alone program. */ |