summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@lerdorf.com>2015-01-30 22:57:40 -0800
committerRasmus Lerdorf <rasmus@lerdorf.com>2015-01-30 22:57:40 -0800
commit74b85316ea06c17256e102483daa472f4b638221 (patch)
treeabe0618e15fcfc93158b4239889485ffc70c4c1c /Zend/zend_execute_API.c
parent130d7320b160443ca160ee6b3a19a034ee2c5ef1 (diff)
parent1e41295097576dbce6c197ddb7507c07ccae3cbe (diff)
downloadphp-git-dstogov-foreach.tar.gz
Merge branch 'foreach' of https://github.com/dstogov/php-src into dstogov-foreachdstogov-foreach
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index c9da46d819..c6a0d8f0c9 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -183,6 +183,11 @@ void init_executor(void) /* {{{ */
EG(scope) = NULL;
+ EG(ht_iterators_count) = sizeof(EG(ht_iterators_slots)) / sizeof(HashTableIterator);
+ EG(ht_iterators_used) = 0;
+ EG(ht_iterators) = EG(ht_iterators_slots);
+ memset(EG(ht_iterators), 0, sizeof(EG(ht_iterators_slots)));
+
EG(active) = 1;
}
/* }}} */
@@ -373,6 +378,11 @@ void shutdown_executor(void) /* {{{ */
zend_shutdown_fpu();
+ EG(ht_iterators_used) = 0;
+ if (EG(ht_iterators) != EG(ht_iterators_slots)) {
+ efree(EG(ht_iterators));
+ }
+
EG(active) = 0;
}
/* }}} */