summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/bytecodes.c7
-rw-r--r--Python/ceval.c9
-rw-r--r--Python/executor_cases.c.h1
-rw-r--r--Python/generated_cases.c.h6
4 files changed, 11 insertions, 12 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index d74f2aa..4afce2c 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -1124,7 +1124,7 @@ dummy_func(
if (retval_o == NULL) {
if (_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)
) {
- monitor_raise(tstate, frame, this_instr);
+ _PyEval_MonitorRaise(tstate, frame, this_instr);
}
if (_PyGen_FetchStopIterationValue(&retval_o) == 0) {
assert(retval_o != NULL);
@@ -2824,7 +2824,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 */
@@ -2849,6 +2849,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 */
@@ -2875,7 +2876,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 */
diff --git a/Python/ceval.c b/Python/ceval.c
index c0074c4..425a2a0 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -225,9 +225,6 @@ maybe_lltrace_resume_frame(_PyInterpreterFrame *frame, _PyInterpreterFrame *skip
#endif
-static void monitor_raise(PyThreadState *tstate,
- _PyInterpreterFrame *frame,
- _Py_CODEUNIT *instr);
static void monitor_reraise(PyThreadState *tstate,
_PyInterpreterFrame *frame,
_Py_CODEUNIT *instr);
@@ -884,7 +881,7 @@ error:
PyTraceBack_Here(f);
}
}
- monitor_raise(tstate, frame, next_instr-1);
+ _PyEval_MonitorRaise(tstate, frame, next_instr-1);
exception_unwind:
{
/* We can't use frame->instr_ptr here, as RERAISE may have set it */
@@ -2200,8 +2197,8 @@ no_tools_for_local_event(PyThreadState *tstate, _PyInterpreterFrame *frame, int
}
}
-static void
-monitor_raise(PyThreadState *tstate, _PyInterpreterFrame *frame,
+void
+_PyEval_MonitorRaise(PyThreadState *tstate, _PyInterpreterFrame *frame,
_Py_CODEUNIT *instr)
{
if (no_tools_for_global_event(tstate, PY_MONITORING_EVENT_RAISE)) {
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 6e3f6cc..6265403 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -3173,6 +3173,7 @@
if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) {
JUMP_TO_ERROR();
}
+ _PyEval_MonitorRaise(tstate, frame, frame->instr_ptr);
_PyErr_Clear(tstate);
}
/* iterator ended normally */
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 76d1cc7..3c643f6 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -3063,7 +3063,7 @@
if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) {
goto error;
}
- monitor_raise(tstate, frame, this_instr);
+ _PyEval_MonitorRaise(tstate, frame, this_instr);
_PyErr_Clear(tstate);
}
/* iterator ended normally */
@@ -3731,7 +3731,7 @@
if (!_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) {
goto error;
}
- monitor_raise(tstate, frame, this_instr);
+ _PyEval_MonitorRaise(tstate, frame, this_instr);
_PyErr_Clear(tstate);
}
/* iterator ended normally */
@@ -6026,7 +6026,7 @@
if (retval_o == NULL) {
if (_PyErr_ExceptionMatches(tstate, PyExc_StopIteration)
) {
- monitor_raise(tstate, frame, this_instr);
+ _PyEval_MonitorRaise(tstate, frame, this_instr);
}
if (_PyGen_FetchStopIterationValue(&retval_o) == 0) {
assert(retval_o != NULL);