ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
static void (*zend_message_dispatcher_p)(long message, void *data);
-static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
+static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
#ifdef ZTS
zend_message_dispatcher_p = utility_functions->message_handler;
zend_block_interruptions = utility_functions->block_interruptions;
zend_unblock_interruptions = utility_functions->unblock_interruptions;
- zend_get_ini_entry_p = utility_functions->get_ini_entry;
+ zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
zend_ticks_function = utility_functions->ticks_function;
zend_compile_file = compile_file;
END_EXTERN_C()
-ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
+ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents)
{
- if (zend_get_ini_entry_p) {
- return zend_get_ini_entry_p(name, name_length, contents);
+ if (zend_get_configuration_directive_p) {
+ return zend_get_configuration_directive_p(name, name_length, contents);
} else {
return FAILURE;
}
void (*message_handler)(long message, void *data);
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
- int (*get_ini_entry)(char *name, uint name_length, zval *contents);
+ int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
} zend_utility_functions;
ZEND_API void zend_message_dispatcher(long message, void *data);
END_EXTERN_C()
-ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
+ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents);
/* Messages for applications of Zend */
/* we're shutting down completely, don't even touch the INI subsystem */
break;
}
- if (zend_get_ini_entry("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
+ if (zend_get_configuration_directive("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
break;
}
if (!atoi(display_memory_cache_stats.value.str.val)) {
{
zend_ini_entry *p = ini_entry;
zend_ini_entry *hashed_ini_entry;
- zval *default_value;
+ zval default_value;
while (p->name) {
p->module_number = module_number;
zend_unregister_ini_entries(module_number);
return FAILURE;
}
- if ((default_value=cfg_get_entry(p->name, p->name_length))) {
+ if ((zend_get_configuration_directive(p->name, p->name_length, &default_value))) {
if (!hashed_ini_entry->on_modify
- || hashed_ini_entry->on_modify(hashed_ini_entry, default_value->value.str.val, default_value->value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP)==SUCCESS) {
- hashed_ini_entry->value = default_value->value.str.val;
- hashed_ini_entry->value_length = default_value->value.str.len;
+ || hashed_ini_entry->on_modify(hashed_ini_entry, default_value.value.str.val, default_value.value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP)==SUCCESS) {
+ hashed_ini_entry->value = default_value.value.str.val;
+ hashed_ini_entry->value_length = default_value.value.str.len;
}
} else {
if (hashed_ini_entry->on_modify) {
#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), sizeof(name), displayer)
#define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb)
-zval *cfg_get_entry(char *name, uint name_length);
-
-
/* Standard message handlers */
ZEND_API ZEND_INI_MH(OnUpdateBool);
ZEND_API ZEND_INI_MH(OnUpdateInt);