From: Sterling Hughes Date: Sun, 25 May 2003 21:58:09 +0000 (+0000) Subject: use proper types X-Git-Tag: RELEASE_1_0_2~592 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb2a324b65dd54d28d0a774d7209d4336ee1dcc7;p=php use proper types --- diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index abfb9aed7c..f5049181f6 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -277,7 +277,7 @@ sxe_property_delete(zval *object, zval *member TSRMLS_DC) static HashTable * sxe_properties_get(zval *object TSRMLS_DC) { - HashTable *return_value; + HashTable *rv; zval *value; php_sxe_object *sxe; char *name; @@ -286,9 +286,9 @@ sxe_properties_get(zval *object TSRMLS_DC) xmlAttrPtr attr; int counter = 0; - MAKE_STD_ZVAL(return_value); - array_init(return_value); - + ALLOC_HASHTABLE_REL(rv); + zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0); + sxe = php_sxe_fetch_object(object TSRMLS_CC); GET_NODE(sxe, node); @@ -302,12 +302,12 @@ sxe_properties_get(zval *object TSRMLS_DC) MAKE_STD_ZVAL(value); _node_as_zval(sxe, node, value); - add_next_index_zval(return_value, value); + zend_hash_next_index_insert(rv, &value, sizeof(zval *), NULL); node = node->next; } - return return_value; + return rv; } /* }}} */