1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

More refinements to Windows OSTRACE usage. Replace all usage of sqlite3TestErrorName() with sqlite3ErrName() and add missing return codes.

FossilOrigin-Name: 05ba5e23fcc5da416d47a8ad5e667ed6a0c7a34a
This commit is contained in:
mistachkin
2013-04-29 03:09:10 +00:00
parent f2c1c99f15
commit e84d8d3219
20 changed files with 212 additions and 268 deletions

View File

@@ -60,12 +60,14 @@ static Tcl_ObjCmdProc blocking_prepare_v2_proc;
int Sqlitetest1_Init(Tcl_Interp *);
int Sqlite3_Init(Tcl_Interp *);
/* Functions from main.c */
extern const char *sqlite3ErrName(int);
/* Functions from test1.c */
void *sqlite3TestTextToPtr(const char *);
const char *sqlite3TestErrorName(int);
int getDbPointer(Tcl_Interp *, const char *, sqlite3 **);
int sqlite3TestMakePointerStr(Tcl_Interp *, char *, void *);
int sqlite3TestErrCode(Tcl_Interp *, sqlite3 *, int);
extern void *sqlite3TestTextToPtr(const char *);
extern int getDbPointer(Tcl_Interp *, const char *, sqlite3 **);
extern int sqlite3TestMakePointerStr(Tcl_Interp *, char *, void *);
extern int sqlite3TestErrCode(Tcl_Interp *, sqlite3 *, int);
/*
** Handler for events of type EvalEvent.
@@ -559,7 +561,7 @@ static int blocking_step_proc(
pStmt = (sqlite3_stmt*)sqlite3TestTextToPtr(Tcl_GetString(objv[1]));
rc = sqlite3_blocking_step(pStmt);
Tcl_SetResult(interp, (char *)sqlite3TestErrorName(rc), 0);
Tcl_SetResult(interp, (char *)sqlite3ErrName(rc), 0);
return TCL_OK;
}
@@ -606,7 +608,7 @@ static int blocking_prepare_v2_proc(
}
if( rc!=SQLITE_OK ){
assert( pStmt==0 );
sprintf(zBuf, "%s ", (char *)sqlite3TestErrorName(rc));
sprintf(zBuf, "%s ", (char *)sqlite3ErrName(rc));
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), 0);
return TCL_ERROR;
}