summaryrefslogtreecommitdiff
path: root/ext/xsl
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-09-20 02:25:56 +0300
committerDmitry Stogov <dmitry@zend.com>2017-09-20 02:25:56 +0300
commit44e0b79ac64b344fc1335c126e548f00d8308602 (patch)
treebcfc582b0d7a46b9798498fcb163079c7b9b8750 /ext/xsl
parentc1dc10aaa5249ba54b6fa5bc043a80bd96f1c9e7 (diff)
downloadphp-git-44e0b79ac64b344fc1335c126e548f00d8308602.tar.gz
Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
Diffstat (limited to 'ext/xsl')
-rw-r--r--ext/xsl/php_xsl.c6
-rw-r--r--ext/xsl/xsltprocessor.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c
index b7160232ef..61afc36099 100644
--- a/ext/xsl/php_xsl.c
+++ b/ext/xsl/php_xsl.c
@@ -113,10 +113,8 @@ zend_object *xsl_objects_new(zend_class_entry *class_type)
zend_object_std_init(&intern->std, class_type);
object_properties_init(&intern->std, class_type);
- ALLOC_HASHTABLE(intern->parameter);
- zend_hash_init(intern->parameter, 0, NULL, ZVAL_PTR_DTOR, 0);
- ALLOC_HASHTABLE(intern->registered_phpfunctions);
- zend_hash_init(intern->registered_phpfunctions, 0, NULL, ZVAL_PTR_DTOR, 0);
+ intern->parameter = zend_new_array(0);
+ intern->registered_phpfunctions = zend_new_array(0);
intern->std.handlers = &xsl_object_handlers;
return &intern->std;
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index 3970e267ba..02c436e340 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -343,8 +343,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
xmlNode *nodep;
dom_object *obj;
if (intern->node_list == NULL) {
- ALLOC_HASHTABLE(intern->node_list);
- zend_hash_init(intern->node_list, 0, NULL, ZVAL_PTR_DTOR, 0);
+ intern->node_list = zend_new_array(0);
}
Z_ADDREF(retval);
zend_hash_next_index_insert(intern->node_list, &retval);