aboutsummaryrefslogtreecommitdiff
path: root/src/tclsqlite.h
diff options
context:
space:
mode:
authordrh <>2024-07-31 22:36:14 +0000
committerdrh <>2024-07-31 22:36:14 +0000
commita1291e79d3d0c8b6aa40b455151b988a92879e17 (patch)
tree7eca588d2e68bb910d8e9a7ce3957997309a2f79 /src/tclsqlite.h
parent07f215ad9e3606253d9bc52d59e46a9c7d9a1b63 (diff)
parentb030bc698088aef9789763123de0f6dcd374cba4 (diff)
downloadsqlite-a1291e79d3d0c8b6aa40b455151b988a92879e17.tar.gz
sqlite-a1291e79d3d0c8b6aa40b455151b988a92879e17.zip
Fix the tclsqlite.c TCL interface module so that it works with both Tcl8 and
Tcl9. Make changes across the TCL-based test harness to enable SQLite to be tested with either Tcl8 or Tcl9. Get the --with-tcl= argument on the configure script working. Testing changes only - no changes to the SQLite core. I believe the previous merge attempt didn't work because of errors in the merge itself, not because of faults in the code. Trying again... FossilOrigin-Name: ea9d88f9ca3399bca83bf03893689a927b73e481604b94527e42de43f103eb46
Diffstat (limited to 'src/tclsqlite.h')
-rw-r--r--src/tclsqlite.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/tclsqlite.h b/src/tclsqlite.h
new file mode 100644
index 000000000..b9a948ef1
--- /dev/null
+++ b/src/tclsqlite.h
@@ -0,0 +1,42 @@
+/*
+** 2024-07-30
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface to TCL as used by SQLite.
+** SQLite subcomponents that use TCL (the libsqlite3.c interface library
+** 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
+** the "tcl.h" header that specifies the calling conventions for each
+** interface. That customized "tcl.h" is named "sqlite_tcl.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
+
+/****** 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 ***********/