diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 20:00:05 +0200 |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 20:00:05 +0200 |
commit | 04a7e4432c61e1d622d00818c1de4b837174f30b (patch) | |
tree | c35f1cde9e3c310681308fa775b5d393fb3b22b8 /Python/ceval.c | |
parent | 8b33dd8e547790af86e9fc85ea6c315ead276b6e (diff) | |
parent | 7321e97c20fbe16d4aa7b293998d5dd6562cb776 (diff) | |
download | cpython-git-04a7e4432c61e1d622d00818c1de4b837174f30b.tar.gz |
merge heads
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 32c203ecbc..5f6f35cb54 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1277,7 +1277,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) /* line-by-line tracing support */ if (_Py_TracingPossible && - tstate->c_tracefunc != NULL && !tstate->tracing) { + tstate->c_tracefunc != NULL && !tstate->tracing && + f->f_trace != NULL) { int err; /* see maybe_call_line_trace for expository comments */ @@ -3008,7 +3009,7 @@ error: /* Log traceback info. */ PyTraceBack_Here(f); - if (tstate->c_tracefunc != NULL) + if (tstate->c_tracefunc != NULL && f->f_trace != NULL) call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, f); fast_block_end: @@ -3127,7 +3128,7 @@ fast_yield: } if (tstate->use_tracing) { - if (tstate->c_tracefunc) { + if (tstate->c_tracefunc && f->f_trace != NULL) { if (why == WHY_RETURN || why == WHY_YIELD) { if (call_trace(tstate->c_tracefunc, tstate->c_traceobj, f, |