summaryrefslogtreecommitdiff
path: root/Zend/zend_generators.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-08-14 17:53:24 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-08-14 17:53:24 +0200
commit80a2bfafa4516539fafe7f6ab8c64fa47c6f3371 (patch)
treecb736161843e39246988c50266fa4942e2e7dca0 /Zend/zend_generators.c
parentc238b5bbefd9d3c012c587fc6e9fd8ce98546261 (diff)
parent1166359acbaee296d3e067374c878182d8a241e3 (diff)
downloadphp-git-80a2bfafa4516539fafe7f6ab8c64fa47c6f3371.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
Diffstat (limited to 'Zend/zend_generators.c')
-rw-r--r--Zend/zend_generators.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
index 8f7ca83e2a..25413c5b00 100644
--- a/Zend/zend_generators.c
+++ b/Zend/zend_generators.c
@@ -268,7 +268,7 @@ static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */
if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
size += EX_NUM_ARGS() - op_array->num_args;
}
- size += Z_TYPE(execute_data->This) == IS_OBJECT; /* $this */
+ size += (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) != 0; /* $this */
size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */
/* Live vars */
@@ -349,7 +349,7 @@ static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {
}
}
- if (Z_TYPE(execute_data->This) == IS_OBJECT) {
+ if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This));
}
if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {