summaryrefslogtreecommitdiff
path: root/zend/iteratorimpl.cpp
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-07-28 13:13:36 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-07-28 13:13:36 +0200
commit4dd2486b005013df4c88b64b34bb963f13ac4c5d (patch)
treefbbc5ba0bced1cec419362b18502b89b5686c313 /zend/iteratorimpl.cpp
parent0ff610e8129c39872566c60efa832f95f371ad2e (diff)
added "keeprefcount" parameter to Value::detach()
Diffstat (limited to 'zend/iteratorimpl.cpp')
-rw-r--r--zend/iteratorimpl.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/zend/iteratorimpl.cpp b/zend/iteratorimpl.cpp
index 3bd2ed7..49526b1 100644
--- a/zend/iteratorimpl.cpp
+++ b/zend/iteratorimpl.cpp
@@ -81,10 +81,7 @@ void IteratorImpl::key(zend_object_iterator *iter, zval *key TSRMLS_DC)
Value retval(self(iter)->key());
// detach the underlying zval
- zval *val = retval.detach();
-
- // increment number of references of the zval (we keep a copy too)
- Z_ADDREF_P(val);
+ zval *val = retval.detach(true);
// copy it to the key
ZVAL_ZVAL(key, val, 1, 1);