1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

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
This commit is contained in:
drh
2008-08-21 18:49:27 +00:00
parent 801880f66c
commit 70a8ca3c1e
11 changed files with 146 additions and 265 deletions

View File

@@ -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]);
}
}