summaryrefslogtreecommitdiff
path: root/ext/dom/php_dom.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-02-10 15:43:12 +0300
committerDmitry Stogov <dmitry@zend.com>2015-02-10 15:43:12 +0300
commit1eb4352143e42784a59b55e0e531a8faecc0033d (patch)
tree404ae11471af991680685889d292ca120aa76095 /ext/dom/php_dom.c
parent4a875e18fdebfe3af530a6c4367d893c1cb811ae (diff)
downloadphp-git-1eb4352143e42784a59b55e0e531a8faecc0033d.tar.gz
Use new ZEND_HASH_FOREACH_... API.
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r--ext/dom/php_dom.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index b6b66fc507..04c7e3a40e 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -418,7 +418,7 @@ static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ *
HashTable *debug_info,
*prop_handlers = obj->prop_handler,
*std_props;
- HashPosition pos;
+ zend_string *string_key;
dom_prop_handler *entry;
zval object_value;
@@ -435,19 +435,10 @@ static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ *
ZVAL_STRING(&object_value, "(object value omitted)");
- for (zend_hash_internal_pointer_reset_ex(prop_handlers, &pos);
- (entry = zend_hash_get_current_data_ptr_ex(prop_handlers, &pos)) != NULL;
- zend_hash_move_forward_ex(prop_handlers, &pos)) {
+ ZEND_HASH_FOREACH_STR_KEY_PTR(prop_handlers, string_key, entry) {
zval value;
- zend_string *string_key;
- zend_ulong num_key;
- if (entry->read_func(obj, &value) == FAILURE) {
- continue;
- }
-
- if (zend_hash_get_current_key_ex(prop_handlers, &string_key,
- &num_key, &pos) != HASH_KEY_IS_STRING) {
+ if (entry->read_func(obj, &value) == FAILURE || !string_key) {
continue;
}
@@ -457,7 +448,7 @@ static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ *
}
zend_hash_add(debug_info, string_key, &value);
- }
+ } ZEND_HASH_FOREACH_END();
zval_dtor(&object_value);