aboutsummaryrefslogtreecommitdiff
path: root/src/test_tclvar.c
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/test_tclvar.c
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/test_tclvar.c')
-rw-r--r--src/test_tclvar.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/test_tclvar.c b/src/test_tclvar.c
index 36165bc27..9be877449 100644
--- a/src/test_tclvar.c
+++ b/src/test_tclvar.c
@@ -36,11 +36,7 @@
** according to "fullname" and "value" only.
*/
#include "sqliteInt.h"
-#if defined(INCLUDE_SQLITE_TCL_H)
-# include "sqlite_tcl.h"
-#else
-# include "tcl.h"
-#endif
+#include "tclsqlite.h"
#include <stdlib.h>
#include <string.h>
@@ -150,10 +146,10 @@ static int next2(Tcl_Interp *interp, tclvar_cursor *pCur, Tcl_Obj *pObj){
Tcl_IncrRefCount(pCur->pList2);
assert( pCur->i2==0 );
}else{
- int n = 0;
+ Tcl_Size n = 0;
pCur->i2++;
Tcl_ListObjLength(0, pCur->pList2, &n);
- if( pCur->i2>=n ){
+ if( pCur->i2>=(int)n ){
Tcl_DecrRefCount(pCur->pList2);
pCur->pList2 = 0;
pCur->i2 = 0;
@@ -167,14 +163,14 @@ static int next2(Tcl_Interp *interp, tclvar_cursor *pCur, Tcl_Obj *pObj){
static int tclvarNext(sqlite3_vtab_cursor *cur){
Tcl_Obj *pObj;
- int n = 0;
+ Tcl_Size n = 0;
int ok = 0;
tclvar_cursor *pCur = (tclvar_cursor *)cur;
Tcl_Interp *interp = ((tclvar_vtab *)(cur->pVtab))->interp;
Tcl_ListObjLength(0, pCur->pList1, &n);
- while( !ok && pCur->i1<n ){
+ while( !ok && pCur->i1<(int)n ){
Tcl_ListObjIndex(0, pCur->pList1, pCur->i1, &pObj);
ok = next2(interp, pCur, pObj);
if( !ok ){