diff options
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 6e7e45bf3f..f2cd3a9d5a 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -268,7 +268,7 @@ sys_audit_tstate(PyThreadState *ts, const char *event, break; } if (canTrace) { - ts->cframe->use_tracing = (ts->c_tracefunc || ts->c_profilefunc); + ts->cframe->use_tracing = (ts->c_tracefunc || ts->c_profilefunc) ? 255 : 0; ts->tracing--; } PyObject* args[2] = {eventName, eventArgs}; @@ -283,7 +283,7 @@ sys_audit_tstate(PyThreadState *ts, const char *event, Py_DECREF(o); Py_CLEAR(hook); } - ts->cframe->use_tracing = (ts->c_tracefunc || ts->c_profilefunc); + ts->cframe->use_tracing = (ts->c_tracefunc || ts->c_profilefunc) ? 255 : 0; ts->tracing--; if (_PyErr_Occurred(ts)) { goto exit; |