summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 362cd0b..4930433 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -636,6 +636,8 @@ eval_frame(PyFrameObject *f)
if (call_trace(tstate->c_tracefunc, tstate->c_traceobj,
f, PyTrace_CALL, Py_None)) {
/* Trace function raised an error */
+ --tstate->recursion_depth;
+ tstate->frame = f->f_back;
return NULL;
}
}
@@ -646,6 +648,8 @@ eval_frame(PyFrameObject *f)
tstate->c_profileobj,
f, PyTrace_CALL, Py_None)) {
/* Profile function raised an error */
+ --tstate->recursion_depth;
+ tstate->frame = f->f_back;
return NULL;
}
}