]> granicus.if.org Git - php/commitdiff
- MFH Rename dump_config_hash() to get_config_hash() as it doesn't dump
authorMarcus Boerger <helly@php.net>
Sun, 3 Feb 2008 14:35:59 +0000 (14:35 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 3 Feb 2008 14:35:59 +0000 (14:35 +0000)
ext/standard/basic_functions.c
ext/standard/basic_functions.h
main/php_ini.c
main/php_ini.h

index 13e822942c61aeac9eca3943b4c6b0625e57ea8f..d8539cd1cde7192b12dce6be46545d13a073ad41 100644 (file)
@@ -944,11 +944,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1)
        ZEND_ARG_INFO(0, scanner_mode)
 ZEND_END_ARG_INFO()
 
-#if ZEND_DEBUG
 static
-ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
 ZEND_END_ARG_INFO()
-#endif
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
@@ -3403,9 +3401,7 @@ const zend_function_entry basic_functions[] = { /* {{{ */
        PHP_FE(connection_status,                                                                                               arginfo_connection_status)
        PHP_FE(ignore_user_abort,                                                                                               arginfo_ignore_user_abort)
        PHP_FE(parse_ini_file,                                                                                                  arginfo_parse_ini_file)
-#if ZEND_DEBUG
-       PHP_FE(dump_config_hash,                                                                                                arginfo_dump_config_hash)
-#endif
+       PHP_FE(get_config_hash,                                                                                                 arginfo_get_config_hash)
        PHP_FE(is_uploaded_file,                                                                                                arginfo_is_uploaded_file)
        PHP_FE(move_uploaded_file,                                                                                              arginfo_move_uploaded_file)
 
@@ -6233,18 +6229,16 @@ PHP_FUNCTION(parse_ini_file)
 }
 /* }}} */
 
-#if ZEND_DEBUG
-/* {{{ proto void dump_config_hash(void)
+/* {{{ proto array get_config_hash(void)
  */
-PHP_FUNCTION(dump_config_hash)
+PHP_FUNCTION(get_config_hash)
 {
-       HashTable hash = get_configuration_hash();
+       HashTable *hash = php_ini_get_configuration_hash();
 
        array_init(return_value);
-       zend_hash_apply_with_arguments(&hash, (apply_func_args_t) add_config_entry_cb, 1, return_value TSRMLS_CC);
+       zend_hash_apply_with_arguments(hash, (apply_func_args_t) add_config_entry_cb, 1, return_value TSRMLS_CC);
 }
 /* }}} */
-#endif
 
 static int copy_request_variable(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
 {
index 874bf2b9361345c3ed92a4356846e5c5cba3b2ca..2b4ed9967d7584592f9da782963a36864a2873e3 100644 (file)
@@ -125,9 +125,7 @@ PHP_FUNCTION(move_uploaded_file);
 
 /* From the INI parser */
 PHP_FUNCTION(parse_ini_file);
-#if ZEND_DEBUG
 PHP_FUNCTION(dump_config_hash);
-#endif
 
 PHP_FUNCTION(str_rot13);
 PHP_FUNCTION(stream_get_filters);
index 9ed975529e091810122350c7a12eba1836649f9a..8a103a08a3a391c47102ea156cd26056d38dda63 100644 (file)
@@ -840,13 +840,10 @@ PHPAPI int cfg_get_string(char *varname, char **result)
 }
 /* }}} */
 
-#if ZEND_DEBUG
-#include "php_ini.h"
-PHPAPI HashTable get_configuration_hash(void)
+PHPAPI HashTable* php_ini_get_configuration_hash(void) /* {{{ */
 {
-       return configuration_hash;
-}
-#endif
+       return &configuration_hash;
+} /* }}} */
 
 /*
  * Local variables:
index d69793ae9314734f2e0c8dd10a8f66b7733d9514..b5b2b65677622dde022b82b5b65ef577297ebbc0 100644 (file)
@@ -36,9 +36,7 @@ PHPAPI int php_parse_user_ini_file(char *dirname, char *ini_filename, HashTable
 PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int stage TSRMLS_DC);
 PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC);
 PHPAPI void php_ini_activate_per_host_config(char *host, uint host_len TSRMLS_DC);
-#if ZEND_DEBUG
-PHPAPI HashTable get_configuration_hash(void);
-#endif
+PHPAPI HashTable* php_in_get_configuration_hash(void);
 END_EXTERN_C()
 
 #define PHP_INI_USER   ZEND_INI_USER