1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Do not attempt to build the code in ext/expert/sqlite3expert.c if

SQLITE_OMIT_VIRTUALTABLE is defined.

FossilOrigin-Name: ba967ad2e38590fe2a51e814a087140089be5e6a06a795a958e70a8a47f6350f
This commit is contained in:
dan
2018-01-09 14:30:49 +00:00
parent 8ee5d0fc05
commit f87ae41f52
5 changed files with 25 additions and 11 deletions

View File

@ -23,6 +23,11 @@ if {![info exists testdir]} {
source $testdir/tester.tcl
set testprefix expert1
if {[info commands sqlite3_expert_new]==""} {
finish_test
return
}
set CLI [test_binary_name sqlite3]
set CMD [test_binary_name sqlite3_expert]

View File

@ -15,6 +15,8 @@
#include <string.h>
#include <stdio.h>
#ifndef SQLITE_OMIT_VIRTUALTABLE
typedef sqlite3_int64 i64;
typedef sqlite3_uint64 u64;
@ -1932,3 +1934,5 @@ void sqlite3_expert_destroy(sqlite3expert *p){
sqlite3_free(p);
}
}
#endif /* ifndef SQLITE_OMIT_VIRTUAL_TABLE */

View File

@ -26,6 +26,8 @@
# endif
#endif
#ifndef SQLITE_OMIT_VIRTUALTABLE
/*
** Extract an sqlite3* db handle from the object passed as the second
** argument. If successful, set *pDb to point to the db handle and return
@ -195,7 +197,10 @@ static int SQLITE_TCLAPI test_sqlite3_expert_new(
return rc;
}
#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */
int TestExpert_Init(Tcl_Interp *interp){
#ifndef SQLITE_OMIT_VIRTUALTABLE
struct Cmd {
const char *zCmd;
Tcl_ObjCmdProc *xProc;
@ -208,7 +213,7 @@ int TestExpert_Init(Tcl_Interp *interp){
struct Cmd *p = &aCmd[i];
Tcl_CreateObjCommand(interp, p->zCmd, p->xProc, 0, 0);
}
#endif
return TCL_OK;
}