diff options
author | drh <drh@noemail.net> | 2013-06-26 13:31:50 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-06-26 13:31:50 +0000 |
commit | fd64cedc4be4ec9e83fe37190bbc599ae232aaf2 (patch) | |
tree | eb26e9fd9625f522104f3343c3dd77e9296f2fc7 /src/tclsqlite.c | |
parent | 85b303df54a633e71380e3ffc0816ff952399b61 (diff) | |
parent | 989a6dbef118464509e7a303717fd0c61bbde1b8 (diff) | |
download | sqlite-fd64cedc4be4ec9e83fe37190bbc599ae232aaf2.tar.gz sqlite-fd64cedc4be4ec9e83fe37190bbc599ae232aaf2.zip |
Bring the sessions branch up-to-date with all the latest trunk changes.
FossilOrigin-Name: 086a127236ee99d67513490fb7b5549e8b752c44
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 9bd111d94..78a03083b 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -3196,7 +3196,7 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ */ #ifndef USE_TCL_STUBS # undef Tcl_InitStubs -# define Tcl_InitStubs(a,b,c) +# define Tcl_InitStubs(a,b,c) TCL_VERSION #endif /* @@ -3220,19 +3220,18 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** The EXTERN macros are required by TCL in order to work on windows. */ EXTERN int Sqlite3_Init(Tcl_Interp *interp){ - Tcl_InitStubs(interp, "8.4", 0); - Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0); - Tcl_PkgProvide(interp, "sqlite3", PACKAGE_VERSION); - + int rc = Tcl_InitStubs(interp, "8.4", 0)==0 ? TCL_ERROR : TCL_OK; + if( rc==TCL_OK ){ + Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0); #ifndef SQLITE_3_SUFFIX_ONLY - /* The "sqlite" alias is undocumented. It is here only to support - ** legacy scripts. All new scripts should use only the "sqlite3" - ** command. - */ - Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0); + /* The "sqlite" alias is undocumented. It is here only to support + ** legacy scripts. All new scripts should use only the "sqlite3" + ** command. */ + Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0); #endif - - return TCL_OK; + rc = Tcl_PkgProvide(interp, "sqlite3", PACKAGE_VERSION); + } + return rc; } EXTERN int Tclsqlite3_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); } EXTERN int Sqlite3_Unload(Tcl_Interp *interp, int flags){ return TCL_OK; } |