Skip to content

Commit

Permalink
Revert "Fixed reference counting"
Browse files Browse the repository at this point in the history
This reverts commit 5bf1efb.
  • Loading branch information
dstogov committed Mar 22, 2012
1 parent 5bf1efb commit 6f49678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/spl/spl_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6f49678

Please sign in to comment.