Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 51f4616

Browse files
committed
revert #16672 for incorrect semantics
1 parent 42d8773 commit 51f4616

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

Misc/NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ Core and Builtins
5050
- Issue #15422: Get rid of PyCFunction_New macro. Use PyCFunction_NewEx
5151
function (PyCFunction_New func is still present for backward compatibility).
5252

53-
- Issue #16672: Improve performance tracing performance
54-
5553
- Issue #14470: Remove w9xpopen support per PEP 11.
5654

5755
- Issue #9856: Replace deprecation warning with raising TypeError

Python/ceval.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
12771277
/* line-by-line tracing support */
12781278

12791279
if (_Py_TracingPossible &&
1280-
tstate->c_tracefunc != NULL && !tstate->tracing &&
1281-
f->f_trace != NULL) {
1280+
tstate->c_tracefunc != NULL && !tstate->tracing) {
12821281
int err;
12831282
/* see maybe_call_line_trace
12841283
for expository comments */
@@ -3009,7 +3008,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
30093008
/* Log traceback info. */
30103009
PyTraceBack_Here(f);
30113010

3012-
if (tstate->c_tracefunc != NULL && f->f_trace != NULL)
3011+
if (tstate->c_tracefunc != NULL)
30133012
call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, f);
30143013

30153014
fast_block_end:
@@ -3128,7 +3127,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
31283127
}
31293128

31303129
if (tstate->use_tracing) {
3131-
if (tstate->c_tracefunc && f->f_trace != NULL) {
3130+
if (tstate->c_tracefunc) {
31323131
if (why == WHY_RETURN || why == WHY_YIELD) {
31333132
if (call_trace(tstate->c_tracefunc,
31343133
tstate->c_traceobj, f,

0 commit comments

Comments
 (0)