com php-src: Temporary refcounting fix: ext/spl/spl_iterators .c
| From: | Dmitry Stogov | Date: | Wed, 09 Apr 2014 21:08:52 +0000 |
| Subject: | com php-src: Temporary refcounting fix: ext/spl/spl_iterators .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77451@lists.php.net to get a copy of this message | ||
Commit: 2016e72111f371e8e4d96f6d7cb870ca0e673175
Author: Dmitry Stogov <dmitry@zend.com> Thu, 10 Apr 2014 01:08:52 +0400
Parents: d8a0c6c6ab5d8855b322d00bb3dcb4d8b8da90e9
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2016e72111f371e8e4d96f6d7cb870ca0e673175
Log:
Temporary refcounting fix
Changed paths:
M ext/spl/spl_iterators.c
Diff:
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 443fbbc..679c480 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -464,7 +464,7 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla
if (instanceof_function(Z_OBJCE_P(iterator), zend_ce_aggregate TSRMLS_CC)) {
zval *aggregate = iterator;
zend_call_method_with_0_params(aggregate, Z_OBJCE_P(aggregate),
&Z_OBJCE_P(aggregate)->iterator_funcs.zf_new_iterator, "getiterator", iterator);
- inc_refcount = 0;
+//??? inc_refcount = 0;
}
if (user_caching_it_flags) {
@@ -478,7 +478,7 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla
zval_ptr_dtor(iterator);
}
iterator = &caching_it;
- inc_refcount = 0;
+//??? inc_refcount = 0;
} else {
iterator = NULL;
}
@@ -493,7 +493,7 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla
if (instanceof_function(Z_OBJCE_P(iterator), zend_ce_aggregate TSRMLS_CC)) {
zval *aggregate = iterator;
zend_call_method_with_0_params(aggregate, Z_OBJCE_P(aggregate),
&Z_OBJCE_P(aggregate)->iterator_funcs.zf_new_iterator, "getiterator", iterator);
- inc_refcount = 0;
+//??? inc_refcount = 0;
}
} else {
iterator = NULL;
@@ -550,11 +550,11 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS,
zend_cla
ce_iterator = Z_OBJCE_P(iterator); /* respect inheritance, don't use spl_ce_RecursiveIterator
*/
intern->iterators[0].iterator = ce_iterator->get_iterator(ce_iterator, iterator, 0
TSRMLS_CC);
- if (inc_refcount) {
+//??? if (inc_refcount) {
ZVAL_COPY(&intern->iterators[0].zobject, iterator);
- } else {
- ZVAL_COPY_VALUE(&intern->iterators[0].zobject, iterator);
- }
+//??? } else {
+//??? ZVAL_COPY_VALUE(&intern->iterators[0].zobject, iterator);
+//??? }
intern->iterators[0].ce = ce_iterator;
intern->iterators[0].state = RS_START;