Skip to content

Commit fa94dab

Browse files
committed
- MFH Rename dump_config_hash() to get_config_hash() as it doesn't dump
1 parent 1ecdaa3 commit fa94dab

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

Diff for: ext/standard/basic_functions.c

+6-12
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1)
944944
ZEND_ARG_INFO(0, scanner_mode)
945945
ZEND_END_ARG_INFO()
946946

947-
#if ZEND_DEBUG
948947
static
949-
ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
948+
ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
950949
ZEND_END_ARG_INFO()
951-
#endif
952950

953951
static
954952
ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
@@ -3403,9 +3401,7 @@ const zend_function_entry basic_functions[] = { /* {{{ */
34033401
PHP_FE(connection_status, arginfo_connection_status)
34043402
PHP_FE(ignore_user_abort, arginfo_ignore_user_abort)
34053403
PHP_FE(parse_ini_file, arginfo_parse_ini_file)
3406-
#if ZEND_DEBUG
3407-
PHP_FE(dump_config_hash, arginfo_dump_config_hash)
3408-
#endif
3404+
PHP_FE(get_config_hash, arginfo_get_config_hash)
34093405
PHP_FE(is_uploaded_file, arginfo_is_uploaded_file)
34103406
PHP_FE(move_uploaded_file, arginfo_move_uploaded_file)
34113407

@@ -6233,18 +6229,16 @@ PHP_FUNCTION(parse_ini_file)
62336229
}
62346230
/* }}} */
62356231

6236-
#if ZEND_DEBUG
6237-
/* {{{ proto void dump_config_hash(void)
6232+
/* {{{ proto array get_config_hash(void)
62386233
*/
6239-
PHP_FUNCTION(dump_config_hash)
6234+
PHP_FUNCTION(get_config_hash)
62406235
{
6241-
HashTable hash = get_configuration_hash();
6236+
HashTable *hash = php_ini_get_configuration_hash();
62426237

62436238
array_init(return_value);
6244-
zend_hash_apply_with_arguments(&hash, (apply_func_args_t) add_config_entry_cb, 1, return_value TSRMLS_CC);
6239+
zend_hash_apply_with_arguments(hash, (apply_func_args_t) add_config_entry_cb, 1, return_value TSRMLS_CC);
62456240
}
62466241
/* }}} */
6247-
#endif
62486242

62496243
static int copy_request_variable(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
62506244
{

Diff for: ext/standard/basic_functions.h

-2
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ PHP_FUNCTION(move_uploaded_file);
125125

126126
/* From the INI parser */
127127
PHP_FUNCTION(parse_ini_file);
128-
#if ZEND_DEBUG
129128
PHP_FUNCTION(dump_config_hash);
130-
#endif
131129

132130
PHP_FUNCTION(str_rot13);
133131
PHP_FUNCTION(stream_get_filters);

Diff for: main/php_ini.c

+3-6
Original file line numberDiff line numberDiff line change
@@ -840,13 +840,10 @@ PHPAPI int cfg_get_string(char *varname, char **result)
840840
}
841841
/* }}} */
842842

843-
#if ZEND_DEBUG
844-
#include "php_ini.h"
845-
PHPAPI HashTable get_configuration_hash(void)
843+
PHPAPI HashTable* php_ini_get_configuration_hash(void) /* {{{ */
846844
{
847-
return configuration_hash;
848-
}
849-
#endif
845+
return &configuration_hash;
846+
} /* }}} */
850847

851848
/*
852849
* Local variables:

Diff for: main/php_ini.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ PHPAPI int php_parse_user_ini_file(char *dirname, char *ini_filename, HashTable
3636
PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int stage TSRMLS_DC);
3737
PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC);
3838
PHPAPI void php_ini_activate_per_host_config(char *host, uint host_len TSRMLS_DC);
39-
#if ZEND_DEBUG
40-
PHPAPI HashTable get_configuration_hash(void);
41-
#endif
39+
PHPAPI HashTable* php_in_get_configuration_hash(void);
4240
END_EXTERN_C()
4341

4442
#define PHP_INI_USER ZEND_INI_USER

0 commit comments

Comments
 (0)