Skip to content

Commit 80a2bfa

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
2 parents c238b5b + 1166359 commit 80a2bfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_generators.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */
268268
if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
269269
size += EX_NUM_ARGS() - op_array->num_args;
270270
}
271-
size += Z_TYPE(execute_data->This) == IS_OBJECT; /* $this */
271+
size += (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) != 0; /* $this */
272272
size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */
273273

274274
/* Live vars */
@@ -349,7 +349,7 @@ static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {
349349
}
350350
}
351351

352-
if (Z_TYPE(execute_data->This) == IS_OBJECT) {
352+
if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
353353
ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This));
354354
}
355355
if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {

0 commit comments

Comments
 (0)