diff options
author | Mark Shannon <mark@hotpy.org> | 2022-05-13 10:24:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 10:24:45 (GMT) |
commit | 22a1db378c5c381272362c5b2f68ac78a368e136 (patch) | |
tree | 40f828dfe421c885aa841b301c12476465c50c19 /Python/ceval.c | |
parent | db388df1d9aff02f791fe01c7c2b28d73982dce6 (diff) | |
download | cpython-22a1db378c5c381272362c5b2f68ac78a368e136.zip cpython-22a1db378c5c381272362c5b2f68ac78a368e136.tar.gz cpython-22a1db378c5c381272362c5b2f68ac78a368e136.tar.bz2 |
GH-92236: Remove spurious "line" event when starting coroutine or generator. (GH-92722)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index f6b07b4..c73218f 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -5680,6 +5680,12 @@ handle_eval_breaker: TRACE_FUNCTION_ENTRY(); DTRACE_FUNCTION_ENTRY(); break; + case POP_TOP: + if (_Py_OPCODE(next_instr[-1]) == RETURN_GENERATOR) { + /* Frame not fully initialized */ + break; + } + /* fall through */ default: /* line-by-line tracing support */ if (PyDTrace_LINE_ENABLED()) { |