diff options
author | Dmitry Stogov <dmitry@zend.com> | 2019-05-28 20:10:02 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2019-05-28 20:10:02 +0300 |
commit | 83804519dffcbb23ef689b37816ee28f2c3192e0 (patch) | |
tree | 52b774b523002e442a938cefed6476e63188405e /ext/spl/spl_directory.c | |
parent | 071b389bc6da9c6dc33e798806a0da63fc1cedf6 (diff) | |
download | php-git-83804519dffcbb23ef689b37816ee28f2c3192e0.tar.gz |
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
Diffstat (limited to 'ext/spl/spl_directory.c')
-rw-r--r-- | ext/spl/spl_directory.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index cb31bb20e9..7e9289c902 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1650,7 +1650,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval } dir_object = Z_SPLFILESYSTEM_P(object); iterator = spl_filesystem_object_to_iterator(dir_object); - ZVAL_COPY(&iterator->intern.data, object); + Z_ADDREF_P(object); + ZVAL_OBJ(&iterator->intern.data, Z_OBJ_P(object)); iterator->intern.funcs = &spl_filesystem_dir_it_funcs; /* ->current must be initialized; rewind doesn't set it and valid * doesn't check whether it's set */ @@ -1851,7 +1852,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva dir_object = Z_SPLFILESYSTEM_P(object); iterator = spl_filesystem_object_to_iterator(dir_object); - ZVAL_COPY(&iterator->intern.data, object); + Z_ADDREF_P(object); + ZVAL_OBJ(&iterator->intern.data, Z_OBJ_P(object)); iterator->intern.funcs = &spl_filesystem_tree_it_funcs; return &iterator->intern; |