mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-43760: Check for tracing using 'bitwise or' instead of branch in dispatch. (GH-28723)
This commit is contained in:
parent
ef6196028f
commit
bd627eb7ed
7 changed files with 249 additions and 217 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue