1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

First attempt at getting the build to work with Tcl 9.0.

FossilOrigin-Name: 6e5bb48a74d63fb8c30528f0005d1763cd2dbb882abf86baf1565721e6bfcf84
This commit is contained in:
drh
2024-07-30 15:49:02 +00:00
parent 07f215ad9e
commit 064b681e9b
56 changed files with 375 additions and 550 deletions

View File

@@ -15,11 +15,7 @@
*/
#include "sqliteInt.h"
#include "btreeInt.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>
@@ -623,6 +619,7 @@ static int SQLITE_TCLAPI btree_insert(
BtCursor *pCur;
int rc;
BtreePayload x;
Tcl_Size n;
if( objc!=4 && objc!=3 ){
Tcl_WrongNumArgs(interp, 1, objv, "?-intkey? CSR KEY VALUE");
@@ -633,10 +630,11 @@ static int SQLITE_TCLAPI btree_insert(
if( objc==4 ){
if( Tcl_GetIntFromObj(interp, objv[2], &rc) ) return TCL_ERROR;
x.nKey = rc;
x.pData = (void*)Tcl_GetByteArrayFromObj(objv[3], &x.nData);
x.pData = (void*)Tcl_GetByteArrayFromObj(objv[3], &n);
x.nData = (int)n;
}else{
x.pKey = (void*)Tcl_GetByteArrayFromObj(objv[2], &rc);
x.nKey = rc;
x.pKey = (void*)Tcl_GetByteArrayFromObj(objv[2], &n);
x.nKey = (int)n;
}
pCur = (BtCursor*)sqlite3TestTextToPtr(Tcl_GetString(objv[1]));