diff options
Diffstat (limited to 'ext')
| -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 |
13 files changed, 32 insertions, 40 deletions
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; |
