mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add the sqlite3_cancel_auto_extension(X) interface which will undo a prior
call to sqlite3_auto_extension(X). FossilOrigin-Name: cdce87eb889a43dafcc560d5f97ab517d0266860
This commit is contained in:
@@ -98,6 +98,22 @@ static int autoExtSqrObjCmd(
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
@@ -114,6 +130,22 @@ static int autoExtCubeObjCmd(
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -161,6 +209,12 @@ int Sqlitetest_autoext_Init(Tcl_Interp *interp){
|
||||
Tcl_CreateObjCommand(interp, "sqlite3_auto_extension_broken",
|
||||
autoExtBrokenObjCmd, 0, 0);
|
||||
#endif
|
||||
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);
|
||||
Tcl_CreateObjCommand(interp, "sqlite3_reset_auto_extension",
|
||||
resetAutoExtObjCmd, 0, 0);
|
||||
return TCL_OK;
|
||||
|
Reference in New Issue
Block a user