diff options
author | drh <drh@noemail.net> | 2006-08-24 14:59:45 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-08-24 14:59:45 +0000 |
commit | 5169bbc6a382bf16a2dbbba183c67af4c4db8e64 (patch) | |
tree | 597b036a960058d2771f4d9218166b0b0c634c7b /src/tclsqlite.c | |
parent | 882e8e4df2cc0ea50735fa27789a8cc13ea33675 (diff) | |
download | sqlite-5169bbc6a382bf16a2dbbba183c67af4c4db8e64.tar.gz sqlite-5169bbc6a382bf16a2dbbba183c67af4c4db8e64.zip |
Enhance the sqlite3_set_authorizer() callback so that it provides callbacks
on each SQL function that is invoked. (CVS 3365)
FossilOrigin-Name: 4547c81f7da29b1490c6eba8d9c333218c5cb88f
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 1d5eee14b..e7b317041 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.168 2006/08/24 02:42:28 drh Exp $ +** $Id: tclsqlite.c,v 1.169 2006/08/24 14:59:46 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -553,6 +553,7 @@ static int auth_callback( case SQLITE_ANALYZE : zCode="SQLITE_ANALYZE"; break; case SQLITE_CREATE_VTABLE : zCode="SQLITE_CREATE_VTABLE"; break; case SQLITE_DROP_VTABLE : zCode="SQLITE_DROP_VTABLE"; break; + case SQLITE_FUNCTION : zCode="SQLITE_FUNCTION"; break; default : zCode="????"; break; } Tcl_DStringInit(&str); @@ -2068,9 +2069,12 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ return TCL_ERROR; } p->maxStmt = NUM_PREPARED_STMTS; + p->interp = interp; zArg = Tcl_GetStringFromObj(objv[1], 0); Tcl_CreateObjCommand(interp, zArg, DbObjCmd, (char*)p, DbDeleteCmd); + /* If a TCL procedure named "::sqlite3_init + /* If compiled with SQLITE_TEST turned on, then register the "md5sum" ** SQL function. */ @@ -2087,7 +2091,6 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ #endif } #endif - p->interp = interp; return TCL_OK; } |