From 6f49678fd82913b9aefbf6bf492e6017d4ba14bd Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 22 Mar 2012 15:51:33 +0400 Subject: [PATCH] Revert "Fixed reference counting" This reverts commit 5bf1efbf209b7d14edc8d01098465ed0bdda1516. --- ext/spl/spl_directory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7bd340b403d1..c6eec945e9d1 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1655,8 +1655,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; } @@ -1858,8 +1858,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; }