Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Zend/zend_closures.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,9 @@ ZEND_API void zend_create_fake_closure(zval *res, zend_function *func, zend_clas

closure = (zend_closure *)Z_OBJ_P(res);
closure->func.common.fn_flags |= ZEND_ACC_FAKE_CLOSURE;
if (Z_TYPE(closure->this_ptr) != IS_OBJECT) {
GC_ADD_FLAGS(&closure->std, GC_NOT_COLLECTABLE);
}
}
/* }}} */

Expand Down
1 change: 1 addition & 0 deletions Zend/zend_enum.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ZEND_API zend_object_handlers zend_enum_object_handlers;
zend_object *zend_enum_new(zval *result, zend_class_entry *ce, zend_string *case_name, zval *backing_value_zv)
{
zend_object *zobj = zend_objects_new(ce);
GC_ADD_FLAGS(zobj, GC_NOT_COLLECTABLE);
ZVAL_OBJ(result, zobj);

zval *zname = OBJ_PROP_NUM(zobj, 0);
Expand Down