mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Initialize only the necessary fields.
This commit is contained in:
parent
6bd3b8108a
commit
f216176bc9
@ -4038,7 +4038,9 @@ ZEND_VM_HANDLER(41, ZEND_GENERATOR_CREATE, ANY, ANY)
|
||||
generator = (zend_generator *) Z_OBJ_P(EX(return_value));
|
||||
generator->execute_data = gen_execute_data;
|
||||
generator->frozen_call_stack = NULL;
|
||||
memset(&generator->execute_fake, 0, sizeof(zend_execute_data));
|
||||
generator->execute_fake.opline = NULL;
|
||||
generator->execute_fake.func = NULL;
|
||||
generator->execute_fake.prev_execute_data = NULL;
|
||||
ZVAL_OBJ(&generator->execute_fake.This, (zend_object *) generator);
|
||||
|
||||
gen_execute_data->opline = opline + 1;
|
||||
|
@ -1179,7 +1179,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_CREATE_SPEC_HANDLER(
|
||||
generator = (zend_generator *) Z_OBJ_P(EX(return_value));
|
||||
generator->execute_data = gen_execute_data;
|
||||
generator->frozen_call_stack = NULL;
|
||||
memset(&generator->execute_fake, 0, sizeof(zend_execute_data));
|
||||
generator->execute_fake.opline = NULL;
|
||||
generator->execute_fake.func = NULL;
|
||||
generator->execute_fake.prev_execute_data = NULL;
|
||||
ZVAL_OBJ(&generator->execute_fake.This, (zend_object *) generator);
|
||||
|
||||
gen_execute_data->opline = opline + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user