aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-07-31 10:59:19 +0000
committerdrh <>2024-07-31 10:59:19 +0000
commite388fc7367f4752c6b23b28154654ca39adaf009 (patch)
treec4456a2c120299682b1cd2eb0b2105d1d4329de9 /src
parent4400b0ac45840d17cb5fca1ba4d173fa3982002b (diff)
downloadsqlite-e388fc7367f4752c6b23b28154654ca39adaf009.tar.gz
sqlite-e388fc7367f4752c6b23b28154654ca39adaf009.zip
Fixes to tclsqlite.c to facilitate TEA installs.
FossilOrigin-Name: 7157c3c910565c9385a028793a0c0106c5064ab6a8a6efbe29dd1f1cdb2bd48d
Diffstat (limited to 'src')
-rw-r--r--src/tclsqlite.c23
-rw-r--r--src/tclsqlite.h5
2 files changed, 27 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.
*/
diff --git a/src/tclsqlite.h b/src/tclsqlite.h
index 217b9a05b..ef63641bb 100644
--- a/src/tclsqlite.h
+++ b/src/tclsqlite.h
@@ -14,6 +14,7 @@
** and various test*.c pieces) should #include this file rather than
** including tcl.h directly.
*/
+/****** Any edits to this file must mirrored in tclsqlite.c ***********/
/* When compiling for Windows using STDCALL instead of CDECL calling
** conventions, the MSVC makefile has to build a customized version of
@@ -29,9 +30,13 @@
# endif
#endif
+/****** Any edits to this file must mirrored in tclsqlite.c ***********/
+
/* Compatability between Tcl8.6 and Tcl9.0 */
#if TCL_MAJOR_VERSION==9
# define CONST const
#else
typedef int Tcl_Size;
#endif
+
+/****** Any edits to this file must mirrored in tclsqlite.c ***********/