Changes to allow FTS to be compiled as a loadable module again.

FossilOrigin-Name: 29e69f389cb0078e125ba5814a68b3fe8cf634c6
This commit is contained in:
dan 2011-06-28 07:15:43 +00:00
parent 08f5f4c57d
commit 0ea2517c4e
8 changed files with 36 additions and 20 deletions

View File

@ -27,7 +27,14 @@
# define SQLITE_ENABLE_FTS3
#endif
#ifdef SQLITE_ENABLE_FTS3
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* If not building as part of the core, include sqlite3ext.h. */
#ifndef SQLITE_CORE
# include "sqlite3ext.h"
extern const sqlite3_api_routines *sqlite3_api;
#endif
#include "sqlite3.h"
#include "fts3_tokenizer.h"
#include "fts3_hash.h"
@ -513,5 +520,5 @@ int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr);
int sqlite3Fts3DeferredTokenList(Fts3DeferredToken *, char **, int *);
#endif /* SQLITE_ENABLE_FTS3 */
#endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
#endif /* _FTSINT_H */

View File

@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include "sqlite3.h"
#include "fts3_hash.h"
/*

View File

@ -19,6 +19,8 @@
#include <string.h>
#include <assert.h>
#ifdef SQLITE_TEST
/* Required so that the "ifdef SQLITE_ENABLE_FTS3" below works */
#include "fts3Int.h"
@ -319,3 +321,4 @@ int Sqlitetestfts3_Init(Tcl_Interp *interp){
);
return TCL_OK;
}
#endif /* ifdef SQLITE_TEST */

View File

@ -23,12 +23,7 @@
** * The FTS3 module is being built into the core of
** SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
*/
#include "sqlite3ext.h"
#ifndef SQLITE_CORE
SQLITE_EXTENSION_INIT1
#endif
#include "fts3Int.h"
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
#include <assert.h>

View File

@ -1,5 +1,5 @@
C Remove\san\sunnecessary\sassignment\sfrom\svdbeapi.c.
D 2011-06-27T19:37:23.089
C Changes\sto\sallow\sFTS\sto\sbe\scompiled\sas\sa\sloadable\smodule\sagain.
D 2011-06-28T07:15:43.990
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -64,17 +64,17 @@ F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
F ext/fts3/fts3.c ca776037493d0081da70a6afc0df80f5ce347cb7
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h fa493ccbad78a2c99ad1c984f651c0c202e68536
F ext/fts3/fts3Int.h 61c90f512b563345f9aa99c48c7afd0928de055c
F ext/fts3/fts3_aux.c 0ebfa7b86cf8ff6a0861605fcc63b83ec1b70691
F ext/fts3/fts3_expr.c 23791de01b3a5d313d76e02befd2601d4096bc2b
F ext/fts3/fts3_hash.c aad95afa01cf2a5ffaa448e4b0ab043880cd1efb
F ext/fts3/fts3_hash.c 8dd2d06b66c72c628c2732555a32bc0943114914
F ext/fts3/fts3_hash.h 8331fb2206c609f9fc4c4735b9ab5ad6137c88ec
F ext/fts3/fts3_icu.c 6c8f395cdf9e1e3afa7fadb7e523dbbf381c6dfa
F ext/fts3/fts3_porter.c 8d946908f4812c005d3d33fcbe78418b1f4eb70c
F ext/fts3/fts3_snippet.c 58b2ba2b934c1e2a2f6ac857d7f3c7e1a14b4532
F ext/fts3/fts3_term.c a5457992723455a58804cb75c8cbd8978db5c2ef
F ext/fts3/fts3_test.c c0aae3219df989d3e827d07846097adf8cb09945
F ext/fts3/fts3_tokenizer.c 6089986ebcfc19d4b7aabd2b92773368efa4354f
F ext/fts3/fts3_test.c 24fa13f330db011500acb95590da9eee24951894
F ext/fts3/fts3_tokenizer.c 9ff7ec66ae3c5c0340fa081958e64f395c71a106
F ext/fts3/fts3_tokenizer.h 13ffd9fcb397fec32a05ef5cd9e0fa659bf3dbd3
F ext/fts3/fts3_tokenizer1.c 0dde8f307b8045565cf63797ba9acfaff1c50c68
F ext/fts3/fts3_write.c 194829c8fd024a448fc899e5ff02a8ed06595529
@ -145,7 +145,7 @@ F src/insert.c 3eea5a53d2644116fb865afaa4699fabe62b441c
F src/journal.c 552839e54d1bf76fb8f7abe51868b66acacf6a0e
F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f
F src/lempar.c 7f026423f4d71d989e719a743f98a1cbd4e6d99e
F src/loadext.c 3ae0d52da013a6326310655be6473fd472347b85
F src/loadext.c 99a161b27a499fc8ad40745b7b1900a26f0a5f51
F src/main.c fa654e1802e14a5f6c09c37971c3b69c1001d9c8
F src/malloc.c 591aedb20ae40813f1045f2ef253438a334775d9
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
@ -182,7 +182,7 @@ F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
F src/select.c d9d440809025a58547e39f4f268c2a296bfb56ff
F src/shell.c 0e0173b3e79d956368013e759f084caa7995ecb1
F src/sqlite.h.in 4b7255c10d39c5faf089dbd29cde7c367ff39f1f
F src/sqlite3ext.h c90bd5507099f62043832d73f6425d8d5c5da754
F src/sqlite3ext.h 1a1a4f784aa9c3b00edd287940197de52487cd93
F src/sqliteInt.h 7b72f7c6929757c0678d94524dbc7e7e3d6dc398
F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
F src/status.c 7ac64842c86cec2fc1a1d0e5c16d3beb8ad332bf
@ -949,7 +949,7 @@ F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00
F tool/tostr.awk 11760e1b94a5d3dcd42378f3cc18544c06cfa576
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings.sh 2ebae31e1eb352696f3c2f7706a34c084b28c262
P d9f7993bfa2ecb30c44455de538eb6f8a4a59087
R 883da57d7e06eb3695abd9be14247d70
P 6c871ac1fa3c79baa0053dc49ab106cb3db4cfa0
R 4e5d4c059d7e31bcf35d2d245a2997b7
U dan
Z c99a55a7e4b26c5d9d0bfe655fb88e62
Z c2844ce2a2f8548d3356adfa633cbd5b

View File

@ -1 +1 @@
6c871ac1fa3c79baa0053dc49ab106cb3db4cfa0
29e69f389cb0078e125ba5814a68b3fe8cf634c6

View File

@ -84,6 +84,8 @@
# define sqlite3_create_module 0
# define sqlite3_create_module_v2 0
# define sqlite3_declare_vtab 0
# define sqlite3_vtab_config 0
# define sqlite3_vtab_on_conflict 0
#endif
#ifdef SQLITE_OMIT_SHARED_CACHE
@ -107,6 +109,7 @@
#define sqlite3_blob_open 0
#define sqlite3_blob_read 0
#define sqlite3_blob_write 0
#define sqlite3_blob_reopen 0
#endif
/*
@ -372,6 +375,9 @@ static const sqlite3_api_routines sqlite3Apis = {
0,
0,
#endif
sqlite3_blob_reopen,
sqlite3_vtab_config,
sqlite3_vtab_on_conflict,
};
/*

View File

@ -212,6 +212,9 @@ struct sqlite3_api_routines {
int (*wal_autocheckpoint)(sqlite3*,int);
int (*wal_checkpoint)(sqlite3*,const char*);
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
int (*vtab_config)(sqlite3*,int op,...);
int (*vtab_on_conflict)(sqlite3*);
};
/*
@ -412,6 +415,9 @@ struct sqlite3_api_routines {
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
#define sqlite3_wal_hook sqlite3_api->wal_hook
#define sqlite3_blob_reopen sqlite3_api->blob_reopen
#define sqlite3_vtab_config sqlite3_api->vtab_config
#define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
#endif /* SQLITE_CORE */
#define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;