Skip to content

Commit 86dfb55

Browse files
authored
bpo-45562: Only show debug output from the parser in debug builds (GH-29140)
1 parent 276468d commit 86dfb55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Parser/tokenizer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,11 +1043,13 @@ tok_nextc(struct tok_state *tok)
10431043
else {
10441044
rc = tok_underflow_file(tok);
10451045
}
1046+
#if defined(Py_DEBUG)
10461047
if (Py_DebugFlag) {
10471048
printf("line[%d] = ", tok->lineno);
10481049
print_escape(stdout, tok->cur, tok->inp - tok->cur);
10491050
printf(" tok->done = %d\n", tok->done);
10501051
}
1052+
#endif
10511053
if (!rc) {
10521054
tok->cur = tok->inp;
10531055
return EOF;

0 commit comments

Comments
 (0)