summaryrefslogtreecommitdiff
path: root/ext/simplexml
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-05-28 20:10:02 +0300
committerDmitry Stogov <dmitry@zend.com>2019-05-28 20:10:02 +0300
commit83804519dffcbb23ef689b37816ee28f2c3192e0 (patch)
tree52b774b523002e442a938cefed6476e63188405e /ext/simplexml
parent071b389bc6da9c6dc33e798806a0da63fc1cedf6 (diff)
downloadphp-git-83804519dffcbb23ef689b37816ee28f2c3192e0.tar.gz
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
Diffstat (limited to 'ext/simplexml')
-rw-r--r--ext/simplexml/simplexml.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 7f94091c25..8077fba77d 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -356,7 +356,7 @@ long_dim:
}
if (Z_ISUNDEF_P(rv)) {
- ZVAL_COPY_VALUE(rv, &EG(uninitialized_zval));
+ ZVAL_NULL(rv);
}
return rv;
@@ -2397,7 +2397,8 @@ zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object, i
iterator = emalloc(sizeof(php_sxe_iterator));
zend_iterator_init(&iterator->intern);
- ZVAL_COPY(&iterator->intern.data, object);
+ Z_ADDREF_P(object);
+ ZVAL_OBJ(&iterator->intern.data, Z_OBJ_P(object));
iterator->intern.funcs = &php_sxe_iterator_funcs;
iterator->sxe = Z_SXEOBJ_P(object);