Commit:    dd33437eee9b87cd4022eae5037a75656396f937
Author:    Dmitry Stogov <dmi...@zend.com>         Thu, 22 Mar 2012 15:52:32 
+0400
Parents:   752fec88ef5ce15c750776d008ae843ee1ba761e
Branches:  PHP-5.4

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=dd33437eee9b87cd4022eae5037a75656396f937

Log:
Revert "Fixed reference counting"

This reverts commit 752fec88ef5ce15c750776d008ae843ee1ba761e.

Changed paths:
  M  ext/spl/spl_directory.c


Diff:
dd33437eee9b87cd4022eae5037a75656396f937
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 7bd340b..c6eec94 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;
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to