]> granicus.if.org Git - php/commitdiff
Drop duplicate arg from hash_get_current_key_ex
authorNikita Popov <nikic@php.net>
Tue, 23 Dec 2014 21:00:18 +0000 (22:00 +0100)
committerNikita Popov <nikic@php.net>
Fri, 26 Dec 2014 20:06:18 +0000 (21:06 +0100)
20 files changed:
Zend/zend_builtin_functions.c
Zend/zend_hash.c
Zend/zend_hash.h
ext/com_dotnet/com_variant.c
ext/com_dotnet/com_wrapper.c
ext/dom/php_dom.c
ext/ldap/ldap.c
ext/mysqlnd/mysqlnd_wireprotocol.c
ext/phar/dirstream.c
ext/phar/phar.c
ext/readline/readline_cli.c
ext/reflection/php_reflection.c
ext/soap/php_http.c
ext/soap/php_schema.c
ext/spl/spl_array.c
ext/standard/info.c
main/php_ini.c
sapi/apache2filter/apache_config.c
sapi/apache2handler/apache_config.c
sapi/apache_hooks/php_apache.c

index 520df607949f325c4632316ab5f53962c608988a..32f210e44c37a5fff4eab16b735c3c1f570a66d4 100644 (file)
@@ -651,7 +651,7 @@ ZEND_FUNCTION(each)
        zend_hash_str_add_new(Z_ARRVAL_P(return_value), "value", sizeof("value")-1, entry);
 
        /* add the key elements */
-       if (zend_hash_get_current_key(target_hash, &key, &num_key, 0) == HASH_KEY_IS_STRING) {
+       if (zend_hash_get_current_key(target_hash, &key, &num_key) == HASH_KEY_IS_STRING) {
                ZVAL_STR_COPY(&tmp, key);
                if (Z_REFCOUNTED(tmp)) Z_ADDREF(tmp);
        } else {
index 1de3165359cd629d785ad4eedfbf472723dd296d..ca2d7e69c7401db86b8ee881b4afa442c3bd0908 100644 (file)
@@ -1625,7 +1625,7 @@ ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos)
 
 
 /* This function should be made binary safe  */
-ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, zend_bool duplicate, HashPosition *pos)
+ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos)
 {
        uint32_t idx = *pos;
        Bucket *p;
@@ -1634,11 +1634,7 @@ ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str
        if (idx != INVALID_IDX) {
                p = ht->arData + idx;
                if (p->key) {
-                       if (duplicate) {
-                               *str_index = zend_string_copy(p->key);
-                       } else {
-                               *str_index = p->key;
-                       }
+                       *str_index = p->key;
                        return HASH_KEY_IS_STRING;
                } else {
                        *num_index = p->h;
index 3d76b56b21ca64a799a01f32b28a26ecc2ea2224..fd03050947a42f85f8c60ac5737e1d60fa91750e 100644 (file)
@@ -163,7 +163,7 @@ ZEND_API zend_bool zend_hash_index_exists(const HashTable *ht, zend_ulong h);
        (zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
 ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
 ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
-ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, zend_bool duplicate, HashPosition *pos);
+ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
 ZEND_API void zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos);
 ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
 ZEND_API zval *zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
@@ -183,8 +183,8 @@ typedef struct _HashPointer {
        zend_hash_move_forward_ex(ht, &(ht)->nInternalPointer)
 #define zend_hash_move_backwards(ht) \
        zend_hash_move_backwards_ex(ht, &(ht)->nInternalPointer)
-#define zend_hash_get_current_key(ht, str_index, num_index, duplicate) \
-       zend_hash_get_current_key_ex(ht, str_index, num_index, duplicate, &(ht)->nInternalPointer)
+#define zend_hash_get_current_key(ht, str_index, num_index) \
+       zend_hash_get_current_key_ex(ht, str_index, num_index, &(ht)->nInternalPointer)
 #define zend_hash_get_current_key_zval(ht, key) \
        zend_hash_get_current_key_zval_ex(ht, key, &(ht)->nInternalPointer)
 #define zend_hash_get_current_key_type(ht) \
index ce919d8a035d6b1b8cd6f18f0eff32eadb6518b6..e7db3bb3d3aeaaeb3ca572335e21a42f34e273f0 100644 (file)
@@ -47,7 +47,7 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage)
        zend_hash_internal_pointer_reset_ex(HASH_OF(z), &pos);
        for (;; zend_hash_move_forward_ex(HASH_OF(z), &pos)) {
 
-               keytype = zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &intindex, 0, &pos);
+               keytype = zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &intindex, &pos);
 
                if (HASH_KEY_IS_STRING == keytype) {
                        goto bogus;
@@ -74,7 +74,7 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage)
                if (NULL == (item = zend_hash_get_current_data_ex(HASH_OF(z), &pos))) {
                        break;
                }
-               zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &intindex, 0, &pos);
+               zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &intindex, &pos);
                php_com_variant_from_zval(&va[intindex], item, codepage);               
        }
 
index f1d08c15f217db3d82b6f2e3784d6cb365ace0fa..0df36bd4659312de683778a29474d15cec99dc56 100644 (file)
@@ -463,7 +463,7 @@ static void generate_dispids(php_dispatchex *disp)
                zend_hash_internal_pointer_reset_ex(Z_OBJPROP(disp->object), &pos);
                while (HASH_KEY_NON_EXISTENT != (keytype =
                                zend_hash_get_current_key_ex(Z_OBJPROP(disp->object), &name,
-                               &pid, 0, &pos))) {
+                               &pid, &pos))) {
                        char namebuf[32];
                        if (keytype == HASH_KEY_IS_LONG) {
                                snprintf(namebuf, sizeof(namebuf), ZEND_ULONG_FMT, pid);
@@ -497,7 +497,7 @@ static void generate_dispids(php_dispatchex *disp)
                zend_hash_internal_pointer_reset_ex(&Z_OBJCE(disp->object)->function_table, &pos);
                while (HASH_KEY_NON_EXISTENT != (keytype =
                                zend_hash_get_current_key_ex(&Z_OBJCE(disp->object)->function_table,
-                               &name, &pid, 0, &pos))) {
+                               &name, &pid, &pos))) {
 
                        char namebuf[32];
                        if (keytype == HASH_KEY_IS_LONG) {
@@ -601,7 +601,7 @@ PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *si
        
        zend_hash_internal_pointer_reset_ex(id_to_name, &pos);
        while (HASH_KEY_NON_EXISTENT != (keytype =
-                               zend_hash_get_current_key_ex(id_to_name, &name, &pid, 0, &pos))) {
+                               zend_hash_get_current_key_ex(id_to_name, &name, &pid, &pos))) {
 
                if (keytype == HASH_KEY_IS_LONG) {
 
index 6dd0f8e020cd970c8d689c076ada9a033dba5e15..1a6e5b5ca2feaf8dc0234ed962cfe89a21e31ea4 100644 (file)
@@ -447,7 +447,7 @@ static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ *
                }
 
                if (zend_hash_get_current_key_ex(prop_handlers, &string_key,
-                       &num_key, 0, &pos) != HASH_KEY_IS_STRING) {
+                       &num_key, &pos) != HASH_KEY_IS_STRING) {
                        continue;
                }
 
index 5fea1ce26edb85001ba7e0923328cc695eff9971..30aa41f8202892c9b5224c0ad5fe829406a39e08 100644 (file)
@@ -1328,7 +1328,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
                ldap_mods[i]->mod_op = oper | LDAP_MOD_BVALUES;
                ldap_mods[i]->mod_type = NULL;
 
-               if (zend_hash_get_current_key(Z_ARRVAL_P(entry), &attribute, &index, 0) == HASH_KEY_IS_STRING) {
+               if (zend_hash_get_current_key(Z_ARRVAL_P(entry), &attribute, &index) == HASH_KEY_IS_STRING) {
                        ldap_mods[i]->mod_type = estrndup(attribute->val, attribute->len);
                } else {
                        php_error_docref(NULL, E_WARNING, "Unknown attribute in the data");
@@ -1602,7 +1602,7 @@ PHP_FUNCTION(ldap_modify_batch)
 
                        for (j = 0; j < num_modprops; j++) {
                                /* are the keys strings? */
-                               if (zend_hash_get_current_key(Z_ARRVAL_P(mod), &modkey, &tmpUlong, 0) != HASH_KEY_IS_STRING) {
+                               if (zend_hash_get_current_key(Z_ARRVAL_P(mod), &modkey, &tmpUlong) != HASH_KEY_IS_STRING) {
                                        php_error_docref(NULL, E_WARNING, "Each entry of modifications array must be string-indexed");
                                        RETURN_FALSE;
                                }
index 9f6463b9f9df17c6dea880ea57de3475ed521c28..4f8d97714e1ce2d2369528edd0322ba5a274767b 100644 (file)
@@ -570,7 +570,7 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
                                zend_ulong num_key;
                                size_t value_len = strlen(*entry_value);
                                
-                               if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(packet->connect_attr, &s_key, &s_len, &num_key, 0, &pos_value)) {
+                               if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(packet->connect_attr, &s_key, &s_len, &num_key, &pos_value)) {
                                        ca_payload_len += php_mysqlnd_net_store_length_size(s_len);
                                        ca_payload_len += s_len;
                                        ca_payload_len += php_mysqlnd_net_store_length_size(value_len);
@@ -606,7 +606,7 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
                                        unsigned int s_len;
                                        zend_ulong num_key;
                                        size_t value_len = strlen(*entry_value);
-                                       if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(packet->connect_attr, &s_key, &s_len, &num_key, 0, &pos_value)) {
+                                       if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(packet->connect_attr, &s_key, &s_len, &num_key, &pos_value)) {
                                                /* copy key */
                                                p = php_mysqlnd_net_store_length(p, s_len);
                                                memcpy(p, s_key, s_len);
index 33a3cd20c2f912f51ca119ea11df07ffbf939752..8657abda9223160e5b421131c0fc19ffa4c75f8e 100644 (file)
@@ -97,7 +97,7 @@ static size_t phar_dir_read(php_stream *stream, char *buf, size_t count) /* {{{
        zend_string *str_key;
        zend_ulong unused;
 
-       if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(data, &str_key, &unused, 0, &data->nInternalPointer)) {
+       if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key(data, &str_key, &unused)) {
                return 0;
        }
 
@@ -199,7 +199,7 @@ static php_stream *phar_make_dirstream(char *dir, HashTable *manifest) /* {{{ */
        zend_hash_internal_pointer_reset(manifest);
 
        while (FAILURE != zend_hash_has_more_elements(manifest)) {
-               if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(manifest, &str_key, &unused, 0, &manifest->nInternalPointer)) {
+               if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key(manifest, &str_key, &unused)) {
                        break;
                }
 
@@ -384,8 +384,7 @@ php_stream *phar_wrapper_open_dir(php_stream_wrapper *wrapper, const char *path,
                zend_hash_internal_pointer_reset(&phar->manifest);
                while (FAILURE != zend_hash_has_more_elements(&phar->manifest)) {
                        if (HASH_KEY_NON_EXISTENT != 
-                                       zend_hash_get_current_key_ex(
-                                               &phar->manifest, &str_key, &unused, 0, &phar->manifest.nInternalPointer)) {
+                                       zend_hash_get_current_key(&phar->manifest, &str_key, &unused)) {
                                if (str_key->len > (uint)i_len && 0 == memcmp(str_key->val, internal_file, i_len)) {
                                        /* directory found */
                                        internal_file = estrndup(internal_file,
@@ -612,7 +611,7 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, int options
 
        if (!entry->is_deleted) {
                for (zend_hash_internal_pointer_reset(&phar->manifest);
-                       HASH_KEY_NON_EXISTENT != zend_hash_get_current_key_ex(&phar->manifest, &str_key, &unused, 0, &phar->manifest.nInternalPointer);
+                       HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&phar->manifest, &str_key, &unused);
                        zend_hash_move_forward(&phar->manifest)
                ) {
                        if (str_key->len > path_len && 
@@ -629,7 +628,7 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, int options
                }
 
                for (zend_hash_internal_pointer_reset(&phar->virtual_dirs);
-                       HASH_KEY_NON_EXISTENT != zend_hash_get_current_key_ex(&phar->virtual_dirs, &str_key, &unused, 0, &phar->virtual_dirs.nInternalPointer);
+                       HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&phar->virtual_dirs, &str_key, &unused);
                        zend_hash_move_forward(&phar->virtual_dirs)) {
        
                        if (str_key->len > path_len && 
index b601669507e43dc9a3546687ede231918c9a6e86..d4a5f3a3fe6340500dcbcdd1a470d1ced98f429c 100644 (file)
@@ -1960,7 +1960,7 @@ woohoo:
                        zend_ulong unused;
 
                        for (zend_hash_internal_pointer_reset(&(PHAR_GLOBALS->phar_fname_map));
-                               HASH_KEY_NON_EXISTENT != zend_hash_get_current_key_ex(&(PHAR_GLOBALS->phar_fname_map), &str_key, &unused, 0, &PHAR_GLOBALS->phar_fname_map.nInternalPointer);
+                               HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&(PHAR_GLOBALS->phar_fname_map), &str_key, &unused);
                                zend_hash_move_forward(&(PHAR_GLOBALS->phar_fname_map))
                        ) {
                                if (str_key->len > (uint) filename_len) {
@@ -1979,7 +1979,7 @@ woohoo:
 
                        if (PHAR_G(manifest_cached)) {
                                for (zend_hash_internal_pointer_reset(&cached_phars);
-                                       HASH_KEY_NON_EXISTENT != zend_hash_get_current_key_ex(&cached_phars, &str_key, &unused, 0, &cached_phars.nInternalPointer);
+                                       HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&cached_phars, &str_key, &unused);
                                        zend_hash_move_forward(&cached_phars)
                                ) {
                                        if (str_key->len > (uint) filename_len) {
index b739fbfd4b8a2046b944f09d88a2b1fe93aa78bd..40af798335af302937fd2bef20e405bd90cfa545 100644 (file)
@@ -409,7 +409,7 @@ static char *cli_completion_generator_ht(const char *text, int textlen, int *sta
                (*state)++;
        }
        while(zend_hash_has_more_elements(ht) == SUCCESS) {
-               zend_hash_get_current_key(ht, &name, &number, 0);
+               zend_hash_get_current_key(ht, &name, &number);
                if (!textlen || !strncmp(name->val, text, textlen)) {
                        if (pData) {
                                *pData = zend_hash_get_current_data_ptr(ht);
index 7238212564a3d9e9f453019a99c587fd6b9fdefc..1cd0a51eaf886378a42535b6e896b9c235b8b7ac 100644 (file)
@@ -432,19 +432,12 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
                count = zend_hash_num_elements(&ce->constants_table);
                string_printf(str, "%s  - Constants [%d] {\n", indent, count);
                if (count > 0) {
-                       HashPosition pos;
-                       zval *value;
                        zend_string *key;
-                       zend_ulong num_index;
-
-                       zend_hash_internal_pointer_reset_ex(&ce->constants_table, &pos);
-
-                       while ((value = zend_hash_get_current_data_ex(&ce->constants_table, &pos)) != NULL) {
-                               zend_hash_get_current_key_ex(&ce->constants_table, &key, &num_index, 0, &pos);
+                       zval *value;
 
+                       ZEND_HASH_FOREACH_STR_KEY_VAL(&ce->constants_table, key, value) {
                                _const_string(str, key->val, value, indent);
-                               zend_hash_move_forward_ex(&ce->constants_table, &pos);
-                       }
+                       } ZEND_HASH_FOREACH_END();
                }
                string_printf(str, "%s  }\n", indent);
        }
@@ -567,7 +560,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
                                zend_string *prop_name;
                                zend_ulong index;
 
-                               if (zend_hash_get_current_key_ex(properties, &prop_name, &index, 0, &pos) == HASH_KEY_IS_STRING) {
+                               if (zend_hash_get_current_key_ex(properties, &prop_name, &index, &pos) == HASH_KEY_IS_STRING) {
                                        if (prop_name->len && prop_name->val[0]) { /* skip all private and protected properties */
                                                if (!zend_hash_exists(&ce->properties_info, prop_name)) {
                                                        count++;
@@ -608,7 +601,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
                                        /* Do not display old-style inherited constructors */
                                        if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0
                                                || mptr->common.scope == ce
-                                               || zend_hash_get_current_key_ex(&ce->function_table, &key, &num_index, 0, &pos) != HASH_KEY_IS_STRING
+                                               || zend_hash_get_current_key_ex(&ce->function_table, &key, &num_index, &pos) != HASH_KEY_IS_STRING
                                                || zend_binary_strcasecmp(key->val, key->len, mptr->common.function_name->val, len) == 0)
                                        {
                                                zend_function *closure;
@@ -805,7 +798,7 @@ static void _function_closure_string(string *str, zend_function *fptr, char* ind
        zend_hash_internal_pointer_reset_ex(static_variables, &pos);
        i = 0;
        while (i < count) {
-               zend_hash_get_current_key_ex(static_variables, &key, &num_index, 0, &pos);
+               zend_hash_get_current_key_ex(static_variables, &key, &num_index, &pos);
                string_printf(str, "%s    Variable #%d [ $%s ]\n", indent, i++, key->val);
                zend_hash_move_forward_ex(static_variables, &pos);
        }
index 1bf0c8fe0fdab121f64f3cd723293e4cd23c3945..38db62ca98f2a32a82263e698b4fea642f332855 100644 (file)
@@ -809,7 +809,7 @@ try_again:
                                smart_str_append_const(&soap_headers, "Cookie: ");
                                for (i = 0; i < n; i++) {
                                        data = zend_hash_get_current_data(Z_ARRVAL_P(cookies));
-                                       zend_hash_get_current_key_ex(Z_ARRVAL_P(cookies), &key, NULL, 0, NULL);
+                                       zend_hash_get_current_key_ex(Z_ARRVAL_P(cookies), &key, NULL, NULL);
 
                                        if (Z_TYPE_P(data) == IS_ARRAY) {
                                          zval *value;
@@ -822,9 +822,9 @@ try_again:
                                                      ((tmp = zend_hash_index_find(Z_ARRVAL_P(data), 2)) == NULL ||
                                                       in_domain(phpurl->host,Z_STRVAL_P(tmp))) &&
                                                      (use_ssl || (tmp = zend_hash_index_find(Z_ARRVAL_P(data), 3)) == NULL)) {
-                                                               smart_str_appendl(&soap_headers, key->val, key->len);
+                                                               smart_str_append(&soap_headers, key);
                                                                smart_str_appendc(&soap_headers, '=');
-                                                               smart_str_appendl(&soap_headers, Z_STRVAL_P(value), Z_STRLEN_P(value));
+                                                               smart_str_append(&soap_headers, Z_STR_P(value));
                                                                smart_str_appendc(&soap_headers, ';');
                                                        }
                                                }
index 9eecd35548725ba5a2bdde6e8f6975df20c08a7b..fce5f824435bcfafc6bd9d712b19850181083a9e 100644 (file)
@@ -2164,7 +2164,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT
                                                                newAttr->extraAttributes = ht;
                                                        }
 
-                                                       zend_hash_get_current_key_ex(tmp->attributes, &_key, NULL, 0, &tmp->attributes->nInternalPointer);
+                                                       zend_hash_get_current_key(tmp->attributes, &_key, NULL);
                                                        zend_hash_add_ptr(ht, _key, newAttr);
 
                                                        zend_hash_move_forward(tmp->attributes);
@@ -2172,7 +2172,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT
                                                        zend_ulong index;
 
                                                        schema_attributegroup_fixup(ctx, tmp_attr, ht);
-                                                       zend_hash_get_current_key(tmp->attributes, NULL, &index, 0);
+                                                       zend_hash_get_current_key(tmp->attributes, NULL, &index);
                                                        zend_hash_index_del(tmp->attributes, index);
                                                }
                                        }
index 57ba65bf8e97cc1480e1c6ea8598d272d5a68d87..69d59dc1188295638561cf22691924def55e778b 100644 (file)
@@ -972,7 +972,7 @@ static int spl_array_skip_protected(spl_array_object *intern, HashTable *aht) /*
 
        if (Z_TYPE(intern->array) == IS_OBJECT) {
                do {
-                       if (zend_hash_get_current_key_ex(aht, &string_key, &num_key, 0, &intern->pos) == HASH_KEY_IS_STRING) {
+                       if (zend_hash_get_current_key_ex(aht, &string_key, &num_key, &intern->pos) == HASH_KEY_IS_STRING) {
                                data = zend_hash_get_current_data_ex(aht, &intern->pos);
                                if (data && Z_TYPE_P(data) == IS_INDIRECT &&
                                    Z_TYPE_P(data = Z_INDIRECT_P(data)) == IS_UNDEF) {
index cc332721a4d722885c2754c41bda353ac9e86ec1..71d09af6cd4740574616e1b0d0953d2d279fac30 100644 (file)
@@ -111,7 +111,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht) /* {{{ *
                        }
 
                        zend_hash_internal_pointer_reset_ex(ht, &pos);
-                       while (zend_hash_get_current_key_ex(ht, &key, NULL, 0, &pos) == HASH_KEY_IS_STRING)
+                       while (zend_hash_get_current_key_ex(ht, &key, NULL, &pos) == HASH_KEY_IS_STRING)
                        {
                                if (!sapi_module.phpinfo_as_text) {
                                        php_info_print_html_esc(key->val, key->len);
@@ -119,7 +119,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht) /* {{{ *
                                        php_info_print(key->val);
                                }
                                zend_hash_move_forward_ex(ht, &pos);
-                               if (zend_hash_get_current_key_ex(ht, &key, NULL, 0, &pos) == HASH_KEY_IS_STRING) {
+                               if (zend_hash_get_current_key_ex(ht, &key, NULL, &pos) == HASH_KEY_IS_STRING) {
                                        php_info_print(", ");
                                } else {
                                        break;
index 93b55ded33a65cc1f04803d3e7a3be1b5386fa6b..ebdf526e9636c8d9775eb14ae6be6d29316623b3 100644 (file)
@@ -782,7 +782,7 @@ PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int
 
        /* Walk through config hash and alter matching ini entries using the values found in the hash */
        for (zend_hash_internal_pointer_reset(source_hash);
-               zend_hash_get_current_key(source_hash, &str, &num_index, 0) == HASH_KEY_IS_STRING;
+               zend_hash_get_current_key(source_hash, &str, &num_index) == HASH_KEY_IS_STRING;
                zend_hash_move_forward(source_hash)
        ) {
                data = zend_hash_get_current_data(source_hash);
index f87a04bbd1c0ca9c81bb0dcb21d685c55fc225e8..0e9bb738306631d88407da5ccd1183b1b2212ce2 100644 (file)
@@ -132,8 +132,8 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
 
        phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
        for (zend_hash_internal_pointer_reset(&d->config);
-                       zend_hash_get_current_key_ex(&d->config, &str, &str_len, 
-                               &num_index, 0, NULL) == HASH_KEY_IS_STRING;
+                       zend_hash_get_current_key(&d->config, &str, &str_len, 
+                               &num_index) == HASH_KEY_IS_STRING;
                        zend_hash_move_forward(&d->config)) {
                pe = NULL;
                zend_hash_get_current_data(&d->config, (void **) &data);
@@ -167,8 +167,7 @@ void apply_config(void *dummy)
        php_dir_entry *data;
        
        for (zend_hash_internal_pointer_reset(&d->config);
-                       zend_hash_get_current_key_ex(&d->config, &str, &str_len, NULL, 0, 
-                               NULL) == HASH_KEY_IS_STRING;
+                       zend_hash_get_current_key(&d->config, &str, &str_len, NULL) == HASH_KEY_IS_STRING;
                        zend_hash_move_forward(&d->config)) {
                zend_hash_get_current_data(&d->config, (void **) &data);
                phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
index 9eed8dba0feb4646bd5c3b3ef4b15d6b952a7832..92a683b22c0606caa7e347f91f13b29e4776286e 100644 (file)
@@ -157,8 +157,8 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
 //???  zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
 #if STAS_0
        for (zend_hash_internal_pointer_reset(&d->config);
-                       zend_hash_get_current_key_ex(&d->config, &str, &str_len, 
-                               &num_index, 0, NULL) == HASH_KEY_IS_STRING;
+                       zend_hash_get_current_key(&d->config, &str, &str_len, 
+                               &num_index) == HASH_KEY_IS_STRING;
                        zend_hash_move_forward(&d->config)) {
                pe = NULL;
                zend_hash_get_current_data(&d->config, (void **) &data);
index 57b4505f104493f134aa07da8d6dc7c92f4cd628..3d2ca06e3735802b25f21b2c68ebe929347d2278 100644 (file)
@@ -594,7 +594,7 @@ static void add_header_to_table(table *t, INTERNAL_FUNCTION_PARAMETERS)
                        case 3:
                                zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(first), &pos);
                                while (zend_hash_get_current_data_ex(Z_ARRVAL_P(first), (void **)&entry, &pos) == SUCCESS) {
-                                       switch(zend_hash_get_current_key_ex(Z_ARRVAL_P(first), &string_key, &string_key_len, &num_key, 0, &pos)) {
+                                       switch(zend_hash_get_current_key_ex(Z_ARRVAL_P(first), &string_key, &string_key_len, &num_key, &pos)) {
                                                case HASH_KEY_IS_STRING:
                                                        if (zend_hash_find(Z_ARRVAL_P(first), string_key, string_key_len, (void **)&value) == FAILURE) {
                                                                zend_hash_move_forward_ex(Z_ARRVAL_P(first), &pos);