summaryrefslogtreecommitdiff
path: root/ext/soap/php_sdl.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-01-01 21:30:44 +0100
committerNikita Popov <nikita.ppv@gmail.com>2018-01-01 21:30:44 +0100
commitd93de12c3dd1d598397c31c8ad97c634491de4a9 (patch)
treea2a518ebd75f40ffbb078fdad54ad15ffc1ebc42 /ext/soap/php_sdl.c
parentffc0a1732232abf2a1b27fd61ef3b0a0a737849d (diff)
parent4422f86fde3e0d95aa6d636b64d37e91535b7b08 (diff)
downloadphp-git-d93de12c3dd1d598397c31c8ad97c634491de4a9.tar.gz
Merge branch 'PHP-7.2'
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r--ext/soap/php_sdl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 1a464167c7..0441e53d52 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -2397,12 +2397,6 @@ static void make_persistent_restriction_char_int(sdlRestrictionCharPtr *rest)
}
-static void make_persistent_restriction_char(zval *zv)
-{
- make_persistent_restriction_char_int((sdlRestrictionCharPtr*)&Z_PTR_P(zv));
-}
-
-
static void make_persistent_sdl_type_ref(sdlTypePtr *type, HashTable *ptr_map, HashTable *bp_types)
{
sdlTypePtr tmp;
@@ -2764,9 +2758,15 @@ static sdlTypePtr make_persistent_sdl_type(sdlTypePtr type, HashTable *ptr_map,
}
if (type->restrictions->enumeration) {
+ sdlRestrictionCharPtr tmp, penum;
ptype->restrictions->enumeration = malloc(sizeof(HashTable));
zend_hash_init(ptype->restrictions->enumeration, zend_hash_num_elements(type->restrictions->enumeration), NULL, delete_restriction_var_char_persistent, 1);
- zend_hash_copy(ptype->restrictions->enumeration, type->restrictions->enumeration, make_persistent_restriction_char);
+ ZEND_HASH_FOREACH_STR_KEY_PTR(type->restrictions->enumeration, key, tmp) {
+ penum = tmp;
+ make_persistent_restriction_char_int(&penum);
+ /* We have to duplicate key emalloc->malloc */
+ zend_hash_str_add_ptr(ptype->restrictions->enumeration, ZSTR_VAL(key), ZSTR_LEN(key), penum);
+ } ZEND_HASH_FOREACH_END();
}
}