summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTian Gao <gaogaotiantian@hotmail.com>2024-04-09 08:54:28 (GMT)
committerGitHub <noreply@github.com>2024-04-09 08:54:28 (GMT)
commit57183241af76bf33e44d886a733f799d20fc680c (patch)
tree24654778c3dce97a9f37a2a5258401a1dcdc5c30 /Python
parent99852d9e65aef11fed4bb7bd064e2218220f1ac9 (diff)
downloadcpython-57183241af76bf33e44d886a733f799d20fc680c.zip
cpython-57183241af76bf33e44d886a733f799d20fc680c.tar.gz
cpython-57183241af76bf33e44d886a733f799d20fc680c.tar.bz2
gh-107674: Remove some unnecessary code in instrumentation code (GH-117393)
Diffstat (limited to 'Python')
-rw-r--r--Python/instrumentation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c
index 0f60290..3866144 100644
--- a/Python/instrumentation.c
+++ b/Python/instrumentation.c
@@ -1197,7 +1197,7 @@ _Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame,
/* Special case sys.settrace to avoid boxing the line number,
* only to immediately unbox it. */
if (tools & (1 << PY_MONITORING_SYS_TRACE_ID)) {
- if (tstate->c_tracefunc != NULL && line >= 0) {
+ if (tstate->c_tracefunc != NULL) {
PyFrameObject *frame_obj = _PyFrame_GetFrameObject(frame);
if (frame_obj == NULL) {
return -1;