1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00

Revert "Fixed reference counting"

This reverts commit 14af1fe692.
This commit is contained in:
Dmitry Stogov
2012-03-22 15:51:58 +04:00
parent 14af1fe692
commit 672fe54a00
+2 -2
View File
@@ -1644,8 +1644,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval
/* ->current must be initialized; rewind doesn't set it and valid
* doesn't check whether it's set */
iterator->current = object;
Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2);
}
zval_add_ref(&object);
return (zend_object_iterator*)iterator;
}
@@ -1847,8 +1847,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva
if (iterator->intern.data == NULL) {
iterator->intern.data = object;
iterator->intern.funcs = &spl_filesystem_tree_it_funcs;
zval_add_ref(&object);
}
zval_add_ref(&object);
return (zend_object_iterator*)iterator;
}