aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/fts5/fts5_main.c28
-rw-r--r--ext/fts5/tool/mkfts5c.tcl8
-rw-r--r--ext/misc/json1.c2
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) */