summaryrefslogtreecommitdiff
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-05-19 17:49:29 +0100
committerGitHub <noreply@github.com>2022-05-19 17:49:29 +0100
commit3fd86100022103f41ada043f5bb5a7201e80ac27 (patch)
treed57d89cce134d2556a64ea1935117aa2729fedad /Python/ceval.c
parent70aa1b9b912d8254df3c61ae0a55464962f4c087 (diff)
downloadcpython-git-3fd86100022103f41ada043f5bb5a7201e80ac27.tar.gz
GH-89914: Make the oparg of the YIELD_VALUE instruction equal the stack depth. (GH-92960)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index deb131813e..230198b41f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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;