aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-08-21 18:49:27 +0000
committerdrh <drh@noemail.net>2008-08-21 18:49:27 +0000
commit70a8ca3c1e3ceb0446908fea3e15ef06587b570a (patch)
tree6ac4d0650241f6a99c12e9fd17d169af84d89940 /src/func.c
parent801880f66cc3de3a30b36d6a2d38c49c08da3a75 (diff)
downloadsqlite-70a8ca3c1e3ceb0446908fea3e15ef06587b570a.tar.gz
sqlite-70a8ca3c1e3ceb0446908fea3e15ef06587b570a.zip
Initialize the global built-in function table at start-time
instead of at compile-time. This is less prone to malfunction when compile-time parameters very. (CVS 5583) FossilOrigin-Name: ef6936e50adb9ebea39c890167403fff01bbb5ed
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/func.c b/src/func.c
index 975f7dc81..0f4f0a6e1 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.197 2008/08/20 14:49:24 danielk1977 Exp $
+** $Id: func.c,v 1.198 2008/08/21 18:49:28 drh Exp $
*/
#ifndef CREATE_BUILTIN_HASHTABLE
@@ -1422,3 +1422,13 @@ static FuncDef aBuiltinFunc[] = {
#endif
};
+/*
+** Build up the global built-in function table at initialization
+** time.
+*/
+void sqlite3RegisterGlobalFunctions(void){
+ int i;
+ for(i=0; i<ArraySize(aBuiltinFunc); i++){
+ sqlite3FuncDefInsert(&sqlite3FuncBuiltins, &aBuiltinFunc[i]);
+ }
+}