From 7656c77c389f17d6cdce0ca54a9a1a066564e43a Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sat, 10 Apr 1999 11:21:55 +0000 Subject: [PATCH] We need to initialize the utility values after we initialize the INI file, which in turn, is after we initialize Zend. Set the utility values separately from Zend's initialization --- Zend/zend.c | 9 +++++++-- Zend/zend.h | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index e84a1af549..485256beae 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -158,7 +158,7 @@ static void register_standard_class() } -int zend_startup(zend_utility_functions *utility_functions, zend_utility_values *utility_values, char **extensions) +int zend_startup(zend_utility_functions *utility_functions, char **extensions) { start_memory_manager(); @@ -176,7 +176,6 @@ int zend_startup(zend_utility_functions *utility_functions, zend_utility_values zend_compile_files = compile_files; zend_execute = execute; - zend_uv = *utility_values; zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1); /* set up version */ @@ -213,6 +212,12 @@ void zend_shutdown() } +void zend_set_utility_values(zend_utility_values *utility_values) +{ + zend_uv = *utility_values; +} + + /* this should be compatible with the standard zenderror */ void zenderror(char *error) { diff --git a/Zend/zend.h b/Zend/zend.h index a2395a9ec0..c651c38e1c 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -153,8 +153,9 @@ typedef struct { #define IS_CONSTANT 9 #define IS_METHOD 10 /* for overloaded function calls */ -int zend_startup(zend_utility_functions *utility_functions, zend_utility_values *utility_values, char **extensions); +int zend_startup(zend_utility_functions *utility_functions, char **extensions); void zend_shutdown(); +void zend_set_utility_values(zend_utility_values *utility_values); ZEND_API void zend_bailout(); ZEND_API char *get_zend_version(); -- 2.40.0