diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-10-03 19:51:01 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-10-03 19:51:01 +0000 |
commit | 557838efa45f2b23ce2a17b5b54c2e8d22f1336d (patch) | |
tree | b113eace1ef6e8f16eba27ba746585c9213366f4 /ext/soap/php_schema.c | |
parent | 8e1c9371bbc68d433702b9a7e647c7ad268b050c (diff) | |
download | php-git-557838efa45f2b23ce2a17b5b54c2e8d22f1336d.tar.gz |
Last set of zend_hash_init() optimizations
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r-- | ext/soap/php_schema.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c index 9040eec57d..896ea6313a 100644 --- a/ext/soap/php_schema.c +++ b/ext/soap/php_schema.c @@ -2039,7 +2039,7 @@ static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) xmlNodePtr node; attr->extraAttributes = emalloc(sizeof(HashTable)); - zend_hash_init(attr->extraAttributes, 0, NULL, delete_extra_attribute, 0); + zend_hash_init(attr->extraAttributes, zend_hash_num_elements((*tmp)->extraAttributes), NULL, delete_extra_attribute, 0); zend_hash_copy(attr->extraAttributes, (*tmp)->extraAttributes, copy_extra_attribute, &node, sizeof(xmlNodePtr)); } attr->encode = (*tmp)->encode; @@ -2085,7 +2085,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT if (newAttr->extraAttributes) { xmlNodePtr node; HashTable *ht = emalloc(sizeof(HashTable)); - zend_hash_init(ht, 0, NULL, delete_extra_attribute, 0); + zend_hash_init(ht, zend_hash_num_elements(newAttr->extraAttributes), NULL, delete_extra_attribute, 0); zend_hash_copy(ht, newAttr->extraAttributes, copy_extra_attribute, &node, sizeof(xmlNodePtr)); newAttr->extraAttributes = ht; } |