GH-89914: Make the oparg of the YIELD_VALUE instruction equal the stack depth. (GH-92960)

This commit is contained in:
Mark Shannon 2022-05-19 17:49:29 +01:00 committed by GitHub
parent 70aa1b9b91
commit 3fd8610002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 26 deletions

View file

@ -2698,6 +2698,7 @@ handle_eval_breaker:
}
TARGET(YIELD_VALUE) {
assert(oparg == STACK_LEVEL());
assert(frame->is_entry);
PyObject *retval = POP();
_PyFrame_GetGenerator(frame)->gi_frame_state = FRAME_SUSPENDED;