1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 21:41:22 +02:00

Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed reference counting
This commit is contained in:
David Soria Parra
2012-03-22 12:13:52 +01:00

View File

@@ -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;
}