summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 3ea1bdc..abefd32 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -819,18 +819,19 @@ eval_frame(PyFrameObject *f)
for expository comments */
f->f_stacktop = stack_pointer;
- if (maybe_call_line_trace(tstate->c_tracefunc,
- tstate->c_traceobj,
- f, &instr_lb, &instr_ub)) {
+ err = maybe_call_line_trace(tstate->c_tracefunc,
+ tstate->c_traceobj,
+ f, &instr_lb, &instr_ub);
+ /* Reload possibly changed frame fields */
+ JUMPTO(f->f_lasti);
+ if (f->f_stacktop != NULL) {
+ stack_pointer = f->f_stacktop;
+ f->f_stacktop = NULL;
+ }
+ if (err) {
/* trace function raised an exception */
- why = WHY_EXCEPTION;
goto on_error;
}
- /* Reload possibly changed frame fields */
- JUMPTO(f->f_lasti);
- stack_pointer = f->f_stacktop;
- assert(stack_pointer != NULL);
- f->f_stacktop = NULL;
}
/* Extract opcode and argument */