Skip to content

Commit 5718324

Browse files
pythongh-107674: Remove some unnecessary code in instrumentation code (pythonGH-117393)
1 parent 99852d9 commit 5718324

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/instrumentation.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ _Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame,
11971197
/* Special case sys.settrace to avoid boxing the line number,
11981198
* only to immediately unbox it. */
11991199
if (tools & (1 << PY_MONITORING_SYS_TRACE_ID)) {
1200-
if (tstate->c_tracefunc != NULL && line >= 0) {
1200+
if (tstate->c_tracefunc != NULL) {
12011201
PyFrameObject *frame_obj = _PyFrame_GetFrameObject(frame);
12021202
if (frame_obj == NULL) {
12031203
return -1;

0 commit comments

Comments
 (0)