From 72c287bd232ef3a0dc5ae76a4b5b5879a8ee7786 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 21 Apr 2014 18:25:34 +0400 Subject: Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word --- main/php_ini.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'main/php_ini.c') diff --git a/main/php_ini.c b/main/php_ini.c index 024dbe6821..ed7da808f7 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -262,7 +262,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t /* If option not found in hash or is not an array -> create array, otherwise add to existing array */ if ((find_arr = zend_hash_find(active_hash, Z_STR_P(arg1))) == NULL || Z_TYPE_P(find_arr) != IS_ARRAY) { ZVAL_NEW_PERSISTENT_ARR(&option_arr); - zend_hash_init(Z_ARRVAL(option_arr), 0, NULL, (dtor_func_t) config_zval_dtor, 1); + zend_hash_init(Z_ARRVAL(option_arr), 8, NULL, (dtor_func_t) config_zval_dtor, 1); find_arr = zend_hash_update(active_hash, Z_STR_P(arg1), &option_arr); } @@ -329,7 +329,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t zval section_arr; ZVAL_NEW_PERSISTENT_ARR(§ion_arr); - zend_hash_init(Z_ARRVAL(section_arr), 0, NULL, (dtor_func_t) config_zval_dtor, 1); + zend_hash_init(Z_ARRVAL(section_arr), 8, NULL, (dtor_func_t) config_zval_dtor, 1); entry = zend_hash_str_update(target_hash, key, key_len, §ion_arr); } active_ini_hash = Z_ARRVAL_P(entry); @@ -385,9 +385,7 @@ int php_init_config(TSRMLS_D) int free_ini_search_path = 0; zend_file_handle fh; - if (zend_hash_init(&configuration_hash, 0, NULL, (dtor_func_t) config_zval_dtor, 1) == FAILURE) { - return FAILURE; - } + zend_hash_init(&configuration_hash, 8, NULL, (dtor_func_t) config_zval_dtor, 1); if (sapi_module.ini_defaults) { sapi_module.ini_defaults(&configuration_hash); -- cgit v1.2.1