aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2007-06-22 15:21:15 +0000
committerdanielk1977 <danielk1977@noemail.net>2007-06-22 15:21:15 +0000
commit832a58a68cb62aca4c2e089194f23ecfb066fb95 (patch)
tree1c77226ec9f5de94e1649d12e9b879d10d0435bc /src/func.c
parentbf2564f6123935215e7fc44dd4264f9531851d8a (diff)
downloadsqlite-832a58a68cb62aca4c2e089194f23ecfb066fb95.tar.gz
sqlite-832a58a68cb62aca4c2e089194f23ecfb066fb95.zip
Extend fts2 so that user defined tokenizers may be added. Add a tokenizer that uses the ICU library if available. Documentation and tests to come. (CVS 4108)
FossilOrigin-Name: 68677e420c744b39ea9d7399819e0f376748886d
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/func.c b/src/func.c
index c836ebe5b..d76b38d7b 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.160 2007/06/07 19:08:33 drh Exp $
+** $Id: func.c,v 1.161 2007/06/22 15:21:16 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1410,7 +1410,13 @@ void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
}
}
sqlite3RegisterDateTimeFunctions(db);
- sqlite3_overload_function(db, "MATCH", 2);
+ if( !sqlite3MallocFailed() ){
+ int rc = sqlite3_overload_function(db, "MATCH", 2);
+ assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
+ if( rc==SQLITE_NOMEM ){
+ sqlite3FailedMalloc();
+ }
+ }
#ifdef SQLITE_SSE
(void)sqlite3SseFunctions(db);
#endif