diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-05-23 20:37:53 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-05-23 20:37:53 +0400 |
commit | 9eb89dddb10b7d5b7aa97c04ffc9804cedb8ce04 (patch) | |
tree | 9310ef937b341472e518649825072bc58e999238 /ext/soap | |
parent | 8fbf4027e2c5c5138c08998c5076b5b579987163 (diff) | |
download | php-git-9eb89dddb10b7d5b7aa97c04ffc9804cedb8ce04.tar.gz |
Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros.
Diffstat (limited to 'ext/soap')
-rw-r--r-- | ext/soap/soap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 9660c32e24..5d2eaae9aa 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1178,8 +1178,7 @@ PHP_METHOD(SoapServer, SoapServer) if ((tmp = zend_hash_str_find(ht, "classmap", sizeof("classmap")-1)) != NULL && Z_TYPE_P(tmp) == IS_ARRAY) { ALLOC_HASHTABLE(service->class_map); - zend_hash_init(service->class_map, zend_hash_num_elements(Z_ARRVAL_P(tmp)), NULL, ZVAL_PTR_DTOR, 0); - zend_hash_copy(service->class_map, Z_ARRVAL_P(tmp), zval_add_ref); + zend_array_dup(service->class_map, Z_ARRVAL_P(tmp)); } if ((tmp = zend_hash_str_find(ht, "typemap", sizeof("typemap")-1)) != NULL && @@ -2904,8 +2903,7 @@ PHP_METHOD(SoapClient, __call) if (soap_headers) { if (!free_soap_headers) { HashTable *t = emalloc(sizeof(HashTable)); - zend_hash_init(t, 0, NULL, ZVAL_PTR_DTOR, 0); - zend_hash_copy(t, soap_headers, zval_add_ref); + zend_array_dup(t, soap_headers); soap_headers = t; free_soap_headers = 1; } |