diff options
author | drh <drh@noemail.net> | 2015-10-08 19:29:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-10-08 19:29:18 +0000 |
commit | 50065656f7d038d8b1796edb83ecaa5347da5a1d (patch) | |
tree | d2909fb64acc6a0187d2c4b4941b92222c125cb6 /ext | |
parent | d7fd6aa4ba568e33e9879f94a8542fba0d7be828 (diff) | |
download | sqlite-50065656f7d038d8b1796edb83ecaa5347da5a1d.tar.gz sqlite-50065656f7d038d8b1796edb83ecaa5347da5a1d.zip |
First attempt to add json1 and fts5 to the amalgamation. This check-in does
not compile.
FossilOrigin-Name: d820a1bd1b8dd702d1b3a099af393530cc5a5d51
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fts5/fts5_main.c | 28 | ||||
-rw-r--r-- | ext/fts5/tool/mkfts5c.tcl | 8 | ||||
-rw-r--r-- | ext/misc/json1.c | 2 |
3 files changed, 20 insertions, 18 deletions
diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c index 644d32323..2c1a5ade1 100644 --- a/ext/fts5/fts5_main.c +++ b/ext/fts5/fts5_main.c @@ -2393,14 +2393,7 @@ static void fts5SourceIdFunc( sqlite3_result_text(pCtx, "--FTS5-SOURCE-ID--", -1, SQLITE_TRANSIENT); } -#ifdef _WIN32 -__declspec(dllexport) -#endif -int sqlite3_fts5_init( - sqlite3 *db, - char **pzErrMsg, - const sqlite3_api_routines *pApi -){ +int sqlite3Fts5Init(sqlite3 *db){ static const sqlite3_module fts5Mod = { /* iVersion */ 2, /* xCreate */ fts5CreateMethod, @@ -2430,8 +2423,6 @@ int sqlite3_fts5_init( int rc; Fts5Global *pGlobal = 0; - SQLITE_EXTENSION_INIT2(pApi); - pGlobal = (Fts5Global*)sqlite3_malloc(sizeof(Fts5Global)); if( pGlobal==0 ){ rc = SQLITE_NOMEM; @@ -2471,7 +2462,20 @@ int sqlite3_fts_init( char **pzErrMsg, const sqlite3_api_routines *pApi ){ - return sqlite3_fts5_init(db, pzErrMsg, pApi); + SQLITE_EXTENSION_INIT2(pApi); + (void)pzErrMsg; /* Unused parameter */ + return sqlite3FtsInit(db); } - +#ifdef _WIN32 +__declspec(dllexport) +#endif +int sqlite3_fts5_init( + sqlite3 *db, + char **pzErrMsg, + const sqlite3_api_routines *pApi +){ + SQLITE_EXTENSION_INIT2(pApi); + (void)pzErrMsg; /* Unused parameter */ + return sqlite3FtsInit(db); +} diff --git a/ext/fts5/tool/mkfts5c.tcl b/ext/fts5/tool/mkfts5c.tcl index f5cf5197e..478fd7c01 100644 --- a/ext/fts5/tool/mkfts5c.tcl +++ b/ext/fts5/tool/mkfts5c.tcl @@ -24,7 +24,7 @@ set G(src) [string map [list %dir% $srcdir] { set G(hdr) { -#if !defined(SQLITE_TEST) || defined(SQLITE_ENABLE_FTS5) +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) #if !defined(NDEBUG) && !defined(SQLITE_DEBUG) # define NDEBUG 1 @@ -37,7 +37,7 @@ set G(hdr) { set G(footer) { -#endif /* !defined(SQLITE_TEST) || defined(SQLITE_ENABLE_FTS5) */ +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */ } #------------------------------------------------------------------------- @@ -107,7 +107,3 @@ proc fts5c_close {} { fts5c_init fts5.c foreach f $G(src) { fts5c_printfile $f } fts5c_close - - - - diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 77857f544..f6fb2eafe 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -21,6 +21,7 @@ ** This implementation parses JSON text at 250 MB/s, so it is hard to see ** how JSONB might improve on that.) */ +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1) #if !defined(_SQLITEINT_H_) #include "sqlite3ext.h" #endif @@ -2007,3 +2008,4 @@ int sqlite3_json_init( (void)pzErrMsg; /* Unused parameter */ return sqlite3Json1Init(db); } +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1) */ |