diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2024-07-29 21:51:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-29 21:51:19 (GMT) |
commit | 55554fd2157cbf52caf6c01a64d81b948c41e82c (patch) | |
tree | 92a84fe2fb2f371cf472e434a162510c06f9c54d /Python/bytecodes.c | |
parent | 56340ee8b17f703d6add3e8bb7c0f85af88a5548 (diff) | |
download | cpython-55554fd2157cbf52caf6c01a64d81b948c41e82c.zip cpython-55554fd2157cbf52caf6c01a64d81b948c41e82c.tar.gz cpython-55554fd2157cbf52caf6c01a64d81b948c41e82c.tar.bz2 |
[3.13] GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122419)
(cherry picked from commit 15d4cd096758ca089c6bd6ed808c34cca676d9bb)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index a6e9a73..1a41c7e 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -1037,7 +1037,7 @@ dummy_func( if (retval == NULL) { if (_PyErr_ExceptionMatches(tstate, PyExc_StopIteration) ) { - monitor_raise(tstate, frame, this_instr); + _PyEval_MonitorRaise(tstate, frame, this_instr); } if (_PyGen_FetchStopIterationValue(&retval) == 0) { assert(retval != NULL); @@ -2603,7 +2603,7 @@ dummy_func( if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) { ERROR_NO_POP(); } - monitor_raise(tstate, frame, this_instr); + _PyEval_MonitorRaise(tstate, frame, this_instr); _PyErr_Clear(tstate); } /* iterator ended normally */ @@ -2626,6 +2626,7 @@ dummy_func( if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) { ERROR_NO_POP(); } + _PyEval_MonitorRaise(tstate, frame, frame->instr_ptr); _PyErr_Clear(tstate); } /* iterator ended normally */ @@ -2650,7 +2651,7 @@ dummy_func( if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) { ERROR_NO_POP(); } - monitor_raise(tstate, frame, this_instr); + _PyEval_MonitorRaise(tstate, frame, this_instr); _PyErr_Clear(tstate); } /* iterator ended normally */ |