Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: third_party/sqlite/src/src/test_autoext.c

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/src/test_async.c ('k') | third_party/sqlite/src/src/test_backup.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/src/test_autoext.c
diff --git a/third_party/sqlite/src/src/test_autoext.c b/third_party/sqlite/src/src/test_autoext.c
index 6b1e297ab7c676c14410a0253d4e19a53283b4bf..a5236d23908d45e00c0cc13dd78d3397692ec167 100644
--- a/third_party/sqlite/src/src/test_autoext.c
+++ b/third_party/sqlite/src/src/test_autoext.c
@@ -15,7 +15,7 @@
#include "sqlite3ext.h"
#ifndef SQLITE_OMIT_LOAD_EXTENSION
-static SQLITE_EXTENSION_INIT1
+SQLITE_EXTENSION_INIT1
/*
** The sqr() SQL function returns the square of its input value.
@@ -99,6 +99,22 @@ static int autoExtSqrObjCmd(
}
/*
+** tclcmd: sqlite3_cancel_auto_extension_sqr
+**
+** Unregister the "sqr" extension.
+*/
+static int cancelAutoExtSqrObjCmd(
+ void * clientData,
+ Tcl_Interp *interp,
+ int objc,
+ Tcl_Obj *CONST objv[]
+){
+ int rc = sqlite3_cancel_auto_extension((void*)sqr_init);
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
+ return SQLITE_OK;
+}
+
+/*
** tclcmd: sqlite3_auto_extension_cube
**
** Register the "cube" extension to be loaded automatically.
@@ -115,6 +131,22 @@ static int autoExtCubeObjCmd(
}
/*
+** tclcmd: sqlite3_cancel_auto_extension_cube
+**
+** Unregister the "cube" extension.
+*/
+static int cancelAutoExtCubeObjCmd(
+ void * clientData,
+ Tcl_Interp *interp,
+ int objc,
+ Tcl_Obj *CONST objv[]
+){
+ int rc = sqlite3_cancel_auto_extension((void*)cube_init);
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
+ return SQLITE_OK;
+}
+
+/*
** tclcmd: sqlite3_auto_extension_broken
**
** Register the broken extension to be loaded automatically.
@@ -130,6 +162,22 @@ static int autoExtBrokenObjCmd(
return SQLITE_OK;
}
+/*
+** tclcmd: sqlite3_cancel_auto_extension_broken
+**
+** Unregister the broken extension.
+*/
+static int cancelAutoExtBrokenObjCmd(
+ void * clientData,
+ Tcl_Interp *interp,
+ int objc,
+ Tcl_Obj *CONST objv[]
+){
+ int rc = sqlite3_cancel_auto_extension((void*)broken_init);
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
+ return SQLITE_OK;
+}
+
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
@@ -160,6 +208,12 @@ int Sqlitetest_autoext_Init(Tcl_Interp *interp){
autoExtCubeObjCmd, 0, 0);
Tcl_CreateObjCommand(interp, "sqlite3_auto_extension_broken",
autoExtBrokenObjCmd, 0, 0);
+ Tcl_CreateObjCommand(interp, "sqlite3_cancel_auto_extension_sqr",
+ cancelAutoExtSqrObjCmd, 0, 0);
+ Tcl_CreateObjCommand(interp, "sqlite3_cancel_auto_extension_cube",
+ cancelAutoExtCubeObjCmd, 0, 0);
+ Tcl_CreateObjCommand(interp, "sqlite3_cancel_auto_extension_broken",
+ cancelAutoExtBrokenObjCmd, 0, 0);
#endif
Tcl_CreateObjCommand(interp, "sqlite3_reset_auto_extension",
resetAutoExtObjCmd, 0, 0);
« no previous file with comments | « third_party/sqlite/src/src/test_async.c ('k') | third_party/sqlite/src/src/test_backup.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698