Turns out I'd forgotten to also update the destructor for the iterator
returned by DirectoryIterator.
The iterator for DirectoryIterator maintains the same ->current pointer
throughout its existence (the DirectoryIterator itself) and returns it
(the same object) everytime a value is requested from the iterator.
Moving forward the iterator only changes the object. Previous code
added two references to the object in get_iterator on the account of
1) the iterator memory living in its DirectoryIterator object and
2) the object being stored in iterator->current. This seems to be
unnecessary. Iterators are not responsible for incrementing the refcount
of the values they yield, that's up to the caller (the engine). What
matters for the iterator is that the object exists as long as the
iterator exists and this can be guaranteed by incremented the refcount
only once. Consequently, I only add one reference in get_iterator
(and reclaim it in the iterator destructor).
* 'PHP-5.4' of /home/cjones/php-src: (21 commits)
Fixed bug #61423 (gzip compression fails).
BFN
Fixed bug #61423 (gzip compression fails).
Revert "Fixed reference counting"
Revert "Fixed reference counting"
Revert "Fixed reference counting"
Fixed reference counting
Fixed reference counting
Fix test, and merge the modification from trunk
Ignore the tempoary files
Fix test, which was broken by the fix for #61173
Use the NEWS merge driver if available
Made some SplFileObject::fputcsv not pollute the working dir.
Fixed bug #61453.
Fixed bug #49853 (Soap Client stream context header option ignored)
Always keep the NEWS file from the branch when merging
Fixed bug #61043 (Regression in magic_quotes_gpc fix for CVE-2012-0831)
- update NEWS
- add test for bug #55000 and #54374
- merge fix bug #54374, bug #55500 - filter file names better, no dangling [s, svn revision 321664
...
* 'master' of https://git.php.net/repository/php-src: (26 commits)
Fixed bug #61423 (gzip compression fails).
BFN
Fixed bug #61423 (gzip compression fails).
Revert "Fixed reference counting"
Revert "Fixed reference counting"
Revert "Fixed reference counting"
Revert "Fixed reference counting"
Revert "Fixed reference counting"
Fixed reference counting
Fixed reference counting
Fixed reference counting
Fix test, and merge the modification from trunk
Ignore the tempoary files
Fix test, which was broken by the fix for #61173
Use the NEWS merge driver if available
Made some SplFileObject::fputcsv not pollute the working dir.
Fixed bug #61453.
Fixed bug #49853 (Soap Client stream context header option ignored)
Always keep the NEWS file from the branch when merging
Fixed bug #61043 (Regression in magic_quotes_gpc fix for CVE-2012-0831)
...