OLD | NEW |
1 /* | 1 /* |
2 ** 2007 June 22 | 2 ** 2007 June 22 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 10 matching lines...) Expand all Loading... |
21 ** (in which case SQLITE_CORE is not defined), or | 21 ** (in which case SQLITE_CORE is not defined), or |
22 ** | 22 ** |
23 ** * The FTS2 module is being built into the core of | 23 ** * The FTS2 module is being built into the core of |
24 ** SQLite (in which case SQLITE_ENABLE_FTS2 is defined). | 24 ** SQLite (in which case SQLITE_ENABLE_FTS2 is defined). |
25 */ | 25 */ |
26 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2) | 26 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2) |
27 | 27 |
28 | 28 |
29 #include "sqlite3.h" | 29 #include "sqlite3.h" |
30 #include "sqlite3ext.h" | 30 #include "sqlite3ext.h" |
31 #ifndef SQLITE_CORE | 31 SQLITE_EXTENSION_INIT1 |
32 SQLITE_EXTENSION_INIT1 | |
33 #endif | |
34 | 32 |
35 #include "fts2_hash.h" | 33 #include "fts2_hash.h" |
36 #include "fts2_tokenizer.h" | 34 #include "fts2_tokenizer.h" |
37 #include <assert.h> | 35 #include <assert.h> |
38 #include <stddef.h> | |
39 | 36 |
40 /* | 37 /* |
41 ** Implementation of the SQL scalar function for accessing the underlying | 38 ** Implementation of the SQL scalar function for accessing the underlying |
42 ** hash table. This function may be called as follows: | 39 ** hash table. This function may be called as follows: |
43 ** | 40 ** |
44 ** SELECT <function-name>(<key-name>); | 41 ** SELECT <function-name>(<key-name>); |
45 ** SELECT <function-name>(<key-name>, <pointer>); | 42 ** SELECT <function-name>(<key-name>, <pointer>); |
46 ** | 43 ** |
47 ** where <function-name> is the name passed as the second argument | 44 ** where <function-name> is the name passed as the second argument |
48 ** to the sqlite3Fts2InitHashTable() function (e.g. 'fts2_tokenizer'). | 45 ** to the sqlite3Fts2InitHashTable() function (e.g. 'fts2_tokenizer'). |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 || (rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0)) | 362 || (rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0)) |
366 #endif | 363 #endif |
367 ); | 364 ); |
368 | 365 |
369 sqlite3_free(zTest); | 366 sqlite3_free(zTest); |
370 sqlite3_free(zTest2); | 367 sqlite3_free(zTest2); |
371 return rc; | 368 return rc; |
372 } | 369 } |
373 | 370 |
374 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2) */ | 371 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2) */ |
OLD | NEW |