1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Update test_spellfix.c with latest changes.

FossilOrigin-Name: cba2a65870481df213e006b07e74f0ca19d2d57c
This commit is contained in:
dan
2012-07-13 16:15:20 +00:00
parent bd58d5f7a3
commit 2deb165f4b
4 changed files with 1322 additions and 187 deletions

View File

@@ -1370,6 +1370,31 @@ static int declare_vtab(
return TCL_OK;
}
#include "test_spellfix.c"
/*
** Register the spellfix virtual table module.
*/
static int register_spellfix_module(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[]
){
static sqlite3_module aMod[3];
int iMod;
sqlite3 *db;
if( objc!=2 ){
Tcl_WrongNumArgs(interp, 1, objv, "DB");
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
sqlite3Spellfix1Register(db);
return TCL_OK;
}
#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */
/*
@@ -1382,8 +1407,9 @@ int Sqlitetest8_Init(Tcl_Interp *interp){
Tcl_ObjCmdProc *xProc;
void *clientData;
} aObjCmd[] = {
{ "register_echo_module", register_echo_module, 0 },
{ "sqlite3_declare_vtab", declare_vtab, 0 },
{ "register_echo_module", register_echo_module, 0 },
{ "register_spellfix_module", register_spellfix_module, 0 },
{ "sqlite3_declare_vtab", declare_vtab, 0 },
};
int i;
for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){