0
0
mirror of https://github.com/sqlite/sqlite.git synced 2024-11-21 11:19:14 +01:00

Fix a few minor TCL9 compatibilities issues.

FossilOrigin-Name: 69eed19914ef52bc0101f4ae1c7b242df4ee28675b3581e1f4d60a35494f9f76
This commit is contained in:
drh 2024-08-09 22:48:11 +00:00
parent c60c928717
commit 555aaa432c
4 changed files with 19 additions and 19 deletions

View File

@ -1,5 +1,5 @@
C Fix\sanother\sinstance\swhere\sALTER\sTABLE\swas\sreturning\sSQLITE_INTERNAL\sinstead\nof\sSQLITE_ERROR\sone\smalformed\sinput.
D 2024-08-09T18:42:01.488
C Fix\sa\sfew\sminor\sTCL9\scompatibilities\sissues.
D 2024-08-09T22:48:11.754
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -771,7 +771,7 @@ F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
F src/tclsqlite.c c6888598f08dee3d9112a38ef42c8f5c89ca7f3190f4694744d0b84250f4bf8c
F src/tclsqlite.h c6af51f31a2b2172d674608763a4b98fdf5cd587e4025053e546fb8077757262
F src/test1.c 51159784f29d3dfd4b50fd6ed9c43c8f7f36925c501a3ad3083528e5e5544bd7
F src/test1.c be8cc208c0d50b3a7e570049e55f25ae40c1dfec8165b7ce12c2c8ed9f5b3030
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
F src/test3.c e7573aa0f78ee4e070a4bc8c3493941c1aa64d5c66d4825c74c0f055451f432b
F src/test4.c 13e57ae7ec7a959ee180970aef09deed141252fe9bb07c61054f0dfa4f1dfd5d
@ -813,7 +813,7 @@ F src/test_sqllog.c 540feaea7280cd5f926168aee9deb1065ae136d0bbbe7361e2ef3541783e
F src/test_superlock.c 18355ca274746aa6909e3744163e5deb1196a85d5bc64b9cd377273cef626da7
F src/test_syscall.c 9ad7ab39910c16d29411678d91b0d27a7a996a718df5ee93dcd635e846d0275c
F src/test_tclsh.c 6077f2bdc6b4ea2bace2a0cd6ea48e0a4651007ae7382c13efc0c495eb0c6956
F src/test_tclvar.c 2c42fe9a74af0f3c8f87a339f66d9d3bd3a967fb5db1ed2500348055b954e391
F src/test_tclvar.c ae873248a0188459b1c16ca7cc431265dacce524399e8b46725c2b3b7e048424
F src/test_thread.c d7a8bcea7445f37cc2a1f7f81dd6059634f45e0c61bfe80182b02872fb0328bb
F src/test_vdbecov.c 5c426d9cd2b351f5f9ceb30cabf8c64a63bfcad644c507e0bd9ce2f6ae1a3bf3
F src/test_vfs.c f298475e468c7e14945b20af885917181090c265aa3c4ade897849c9fbd396f2
@ -2204,8 +2204,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 9052187efd1f78abd9b285ac94269a3ba4d65b6aa74c9fa34002ee0628c83919
R cfcbe2c3b80f7c18c681a7771600d22b
P b416756320dfb46ad72b843a7fbf18807d3fd1966251c320de626280b5238a5c
R 3713bfe5df240ec97ce0810792e582f6
U drh
Z 27325e8a3b0694b1cf9e0c044251f29f
Z 6bb203e3c3683b4f2854978314b46998
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
b416756320dfb46ad72b843a7fbf18807d3fd1966251c320de626280b5238a5c
69eed19914ef52bc0101f4ae1c7b242df4ee28675b3581e1f4d60a35494f9f76

View File

@ -8324,7 +8324,7 @@ static int SQLITE_TCLAPI sorter_test_sort4_helper(
for(iStep=0; iStep<nStep && SQLITE_ROW==sqlite3_step(pStmt); iStep++){
int a = sqlite3_column_int(pStmt, 0);
if( a!=sqlite3_column_int(pStmt, iB) ){
Tcl_AppendResult(interp, "data error: (a!=b)", 0);
Tcl_AppendResult(interp, "data error: (a!=b)", (void*)0);
return TCL_ERROR;
}
@ -8343,13 +8343,13 @@ static int SQLITE_TCLAPI sorter_test_sort4_helper(
if( rc!=SQLITE_OK ) goto sql_error;
if( iCksum1!=iCksum2 ){
Tcl_AppendResult(interp, "checksum mismatch", 0);
Tcl_AppendResult(interp, "checksum mismatch", (void*)0);
return TCL_ERROR;
}
return TCL_OK;
sql_error:
Tcl_AppendResult(interp, "sql error: ", sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, "sql error: ", sqlite3_errmsg(db), (void*)0);
return TCL_ERROR;
}
@ -8398,7 +8398,7 @@ static int SQLITE_TCLAPI test_user_add(
){
char *zUser = 0;
char *zPasswd = 0;
int nPasswd = 0;
Tcl_Size nPasswd = 0;
int isAdmin = 0;
sqlite3 *db;
int rc;
@ -8413,7 +8413,7 @@ static int SQLITE_TCLAPI test_user_add(
zUser = Tcl_GetString(objv[2]);
zPasswd = Tcl_GetStringFromObj(objv[3], &nPasswd);
Tcl_GetBooleanFromObj(interp, objv[4], &isAdmin);
rc = sqlite3_user_add(db, zUser, zPasswd, nPasswd, isAdmin);
rc = sqlite3_user_add(db, zUser, zPasswd, (int)nPasswd, isAdmin);
Tcl_SetResult(interp, (char *)t1ErrorName(rc), TCL_STATIC);
return TCL_OK;
}
@ -8431,7 +8431,7 @@ static int SQLITE_TCLAPI test_user_change(
){
char *zUser = 0;
char *zPasswd = 0;
int nPasswd = 0;
Tcl_Size nPasswd = 0;
int isAdmin = 0;
sqlite3 *db;
int rc;
@ -8446,7 +8446,7 @@ static int SQLITE_TCLAPI test_user_change(
zUser = Tcl_GetString(objv[2]);
zPasswd = Tcl_GetStringFromObj(objv[3], &nPasswd);
Tcl_GetBooleanFromObj(interp, objv[4], &isAdmin);
rc = sqlite3_user_change(db, zUser, zPasswd, nPasswd, isAdmin);
rc = sqlite3_user_change(db, zUser, zPasswd, (int)nPasswd, isAdmin);
Tcl_SetResult(interp, (char *)t1ErrorName(rc), TCL_STATIC);
return TCL_OK;
}

View File

@ -68,8 +68,8 @@ struct tclvar_cursor {
Tcl_Obj *pList1; /* Result of [info vars ?pattern?] */
Tcl_Obj *pList2; /* Result of [array names [lindex $pList1 $i1]] */
int i1; /* Current item in pList1 */
int i2; /* Current item (if any) in pList2 */
Tcl_Size i1; /* Current item in pList1 */
Tcl_Size i2; /* Current item (if any) in pList2 */
};
/* Methods for the tclvar module */
@ -149,7 +149,7 @@ static int next2(Tcl_Interp *interp, tclvar_cursor *pCur, Tcl_Obj *pObj){
Tcl_Size n = 0;
pCur->i2++;
Tcl_ListObjLength(0, pCur->pList2, &n);
if( pCur->i2>=(int)n ){
if( pCur->i2>=n ){
Tcl_DecrRefCount(pCur->pList2);
pCur->pList2 = 0;
pCur->i2 = 0;
@ -170,7 +170,7 @@ static int tclvarNext(sqlite3_vtab_cursor *cur){
Tcl_Interp *interp = ((tclvar_vtab *)(cur->pVtab))->interp;
Tcl_ListObjLength(0, pCur->pList1, &n);
while( !ok && pCur->i1<(int)n ){
while( !ok && pCur->i1<n ){
Tcl_ListObjIndex(0, pCur->pList1, pCur->i1, &pObj);
ok = next2(interp, pCur, pObj);
if( !ok ){