summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/src/tclsqlite.c
diff options
context:
space:
mode:
authorjturner <jturner@openbsd.org>2015-03-16 00:06:33 +0000
committerjturner <jturner@openbsd.org>2015-03-16 00:06:33 +0000
commit476ed7b902c71c189883939f8fb66a03e3eb82d9 (patch)
treeac10f46a6d4287dd3790a3815808837f9318d24b /lib/libsqlite3/src/tclsqlite.c
parentfrom zhuk: two grammar fixes; (diff)
downloadwireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.tar.xz
wireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.zip
Update sqlite3 to 3.8.7.4. Changes available here: http://sqlite.org/changes.html#version_3_8_7_4
ok landry@
Diffstat (limited to 'lib/libsqlite3/src/tclsqlite.c')
-rw-r--r--lib/libsqlite3/src/tclsqlite.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libsqlite3/src/tclsqlite.c b/lib/libsqlite3/src/tclsqlite.c
index 9b977e54aea..756d0daa5a9 100644
--- a/lib/libsqlite3/src/tclsqlite.c
+++ b/lib/libsqlite3/src/tclsqlite.c
@@ -760,7 +760,7 @@ static void tclSqlFunc(sqlite3_context *context, int argc, sqlite3_value**argv){
/* If there are arguments to the function, make a shallow copy of the
** script object, lappend the arguments, then evaluate the copy.
**
- ** By "shallow" copy, we mean a only the outer list Tcl_Obj is duplicated.
+ ** By "shallow" copy, we mean only the outer list Tcl_Obj is duplicated.
** The new Tcl_Obj contains pointers to the original list elements.
** That way, when Tcl_EvalObjv() is run and shimmers the first element
** of the list to tclCmdNameType, that alternate representation will
@@ -872,6 +872,9 @@ static int auth_callback(
const char *zArg2,
const char *zArg3,
const char *zArg4
+#ifdef SQLITE_USER_AUTHENTICATION
+ ,const char *zArg5
+#endif
){
const char *zCode;
Tcl_DString str;
@@ -924,6 +927,9 @@ static int auth_callback(
Tcl_DStringAppendElement(&str, zArg2 ? zArg2 : "");
Tcl_DStringAppendElement(&str, zArg3 ? zArg3 : "");
Tcl_DStringAppendElement(&str, zArg4 ? zArg4 : "");
+#ifdef SQLITE_USER_AUTHENTICATION
+ Tcl_DStringAppendElement(&str, zArg5 ? zArg5 : "");
+#endif
rc = Tcl_GlobalEval(pDb->interp, Tcl_DStringValue(&str));
Tcl_DStringFree(&str);
zReply = rc==TCL_OK ? Tcl_GetStringResult(pDb->interp) : "SQLITE_DENY";
@@ -1700,8 +1706,11 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
pDb->zAuth = 0;
}
if( pDb->zAuth ){
+ typedef int (*sqlite3_auth_cb)(
+ void*,int,const char*,const char*,
+ const char*,const char*);
pDb->interp = interp;
- sqlite3_set_authorizer(pDb->db, auth_callback, pDb);
+ sqlite3_set_authorizer(pDb->db,(sqlite3_auth_cb)auth_callback,pDb);
}else{
sqlite3_set_authorizer(pDb->db, 0, 0);
}
@@ -2381,7 +2390,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
if( rc==TCL_OK ){
rc = createIncrblobChannel(
- interp, pDb, zDb, zTable, zColumn, iRow, isReadonly
+ interp, pDb, zDb, zTable, zColumn, (sqlite3_int64)iRow, isReadonly
);
}
#endif