Skip to content

Commit

Permalink
Use different loop terminating conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 17, 2018
1 parent 1154f6f commit 62338a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Zend/zend_execute_API.c
Expand Up @@ -321,7 +321,7 @@ void shutdown_executor(void) /* {{{ */
} else {
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(EG(zend_constants), key, zv) {
zend_constant *c = Z_PTR_P(zv);
if (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) {
if (_idx == EG(persistent_constants_count)) {
break;
}
zval_ptr_dtor_nogc(&c->value);
Expand All @@ -333,15 +333,15 @@ void shutdown_executor(void) /* {{{ */
} ZEND_HASH_FOREACH_END_DEL();
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(EG(function_table), key, zv) {
zend_function *func = Z_PTR_P(zv);
if (func->type == ZEND_INTERNAL_FUNCTION) {
if (_idx == EG(persistent_functions_count)) {
break;
}
destroy_op_array(&func->op_array);
zend_string_release_ex(key, 0);
} ZEND_HASH_FOREACH_END_DEL();
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(EG(class_table), key, zv) {
zend_class_entry *ce = Z_PTR_P(zv);
if (ce->type == ZEND_INTERNAL_CLASS) {
if (_idx == EG(persistent_classes_count)) {
break;
}
destroy_zend_class(zv);
Expand Down

0 comments on commit 62338a2

Please sign in to comment.