mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix a few minor TCL9 compatibilities issues.
FossilOrigin-Name: 69eed19914ef52bc0101f4ae1c7b242df4ee28675b3581e1f4d60a35494f9f76
This commit is contained in:
14
src/test1.c
14
src/test1.c
@ -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;
|
||||
}
|
||||
|
@ -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 ){
|
||||
|
Reference in New Issue
Block a user