aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTian Gao <gaogaotiantian@hotmail.com>2024-04-09 01:54:28 -0700
committerGitHub <noreply@github.com>2024-04-09 09:54:28 +0100
commit57183241af76bf33e44d886a733f799d20fc680c (patch)
tree24654778c3dce97a9f37a2a5258401a1dcdc5c30
parent99852d9e65aef11fed4bb7bd064e2218220f1ac9 (diff)
downloadcpython-57183241af76bf33e44d886a733f799d20fc680c.tar.gz
cpython-57183241af76bf33e44d886a733f799d20fc680c.zip
gh-107674: Remove some unnecessary code in instrumentation code (GH-117393)
-rw-r--r--Python/instrumentation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c
index 0f602908650..3866144a19b 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;