diff options
author | Nikita Popov <nikic@php.net> | 2014-12-23 22:00:18 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-12-26 21:06:18 +0100 |
commit | 2d212b426a22c9d9f357be0a6832ced9a3fff073 (patch) | |
tree | f1d0ec807cca7add558b6282b85e136e2e5a9bfd | |
parent | 3d12fc796b0048ab498f82ac497476129a7976e7 (diff) | |
download | php-git-2d212b426a22c9d9f357be0a6832ced9a3fff073.tar.gz |
Drop duplicate arg from hash_get_current_key_ex
-rw-r--r-- | Zend/zend_builtin_functions.c | 2 | ||||
-rw-r--r-- | Zend/zend_hash.c | 8 | ||||
-rw-r--r-- | Zend/zend_hash.h | 6 | ||||
-rw-r--r-- | ext/com_dotnet/com_variant.c | 4 | ||||
-rw-r--r-- | ext/com_dotnet/com_wrapper.c | 6 | ||||
-rw-r--r-- | ext/dom/php_dom.c | 2 | ||||
-rw-r--r-- | ext/ldap/ldap.c | 4 | ||||
-rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 4 | ||||
-rw-r--r-- | ext/phar/dirstream.c | 11 | ||||
-rw-r--r-- | ext/phar/phar.c | 4 | ||||
-rw-r--r-- | ext/readline/readline_cli.c | 2 | ||||
-rw-r--r-- | ext/reflection/php_reflection.c | 19 | ||||
-rw-r--r-- | ext/soap/php_http.c | 6 | ||||
-rw-r--r-- | ext/soap/php_schema.c | 4 | ||||
-rw-r--r-- | ext/spl/spl_array.c | 2 | ||||
-rw-r--r-- | ext/standard/info.c | 4 | ||||
-rw-r--r-- | main/php_ini.c | 2 | ||||
-rw-r--r-- | sapi/apache2filter/apache_config.c | 7 | ||||
-rw-r--r-- | sapi/apache2handler/apache_config.c | 4 | ||||
-rw-r--r-- | sapi/apache_hooks/php_apache.c | 2 |
20 files changed, 45 insertions, 58 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 520df60794..32f210e44c 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -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 { diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 1de3165359..ca2d7e69c7 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -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; diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 3d76b56b21..fd03050947 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -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) \ diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index ce919d8a03..e7db3bb3d3 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -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); } diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c index f1d08c15f2..0df36bd465 100644 --- a/ext/com_dotnet/com_wrapper.c +++ b/ext/com_dotnet/com_wrapper.c @@ -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) { diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 6dd0f8e020..1a6e5b5ca2 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -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; } diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 5fea1ce26e..30aa41f820 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -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; } diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 9f6463b9f9..4f8d97714e 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -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); diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index 33a3cd20c2..8657abda92 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -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 && diff --git a/ext/phar/phar.c b/ext/phar/phar.c index b601669507..d4a5f3a3fe 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -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) { diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index b739fbfd4b..40af798335 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -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); diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 7238212564..1cd0a51eaf 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -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); } diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 1bf0c8fe0f..38db62ca98 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -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, ';'); } } diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c index 9eecd35548..fce5f82443 100644 --- a/ext/soap/php_schema.c +++ b/ext/soap/php_schema.c @@ -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); } } diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 57ba65bf8e..69d59dc118 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -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) { diff --git a/ext/standard/info.c b/ext/standard/info.c index cc332721a4..71d09af6cd 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -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; diff --git a/main/php_ini.c b/main/php_ini.c index 93b55ded33..ebdf526e96 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -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); diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c index f87a04bbd1..0e9bb73830 100644 --- a/sapi/apache2filter/apache_config.c +++ b/sapi/apache2filter/apache_config.c @@ -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)); diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index 9eed8dba0f..92a683b22c 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -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); diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index 57b4505f10..3d2ca06e37 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -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); |