From 557838efa45f2b23ce2a17b5b54c2e8d22f1336d Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 3 Oct 2006 19:51:01 +0000 Subject: Last set of zend_hash_init() optimizations --- ext/soap/php_schema.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/soap/php_schema.c') 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; } -- cgit v1.2.1