bpo-45562: Only show debug output from the parser in debug builds (GH-29140)

This commit is contained in:
Pablo Galindo Salgado 2021-10-22 09:52:24 +01:00 committed by GitHub
parent 276468dddb
commit 86dfb55d2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1043,11 +1043,13 @@ tok_nextc(struct tok_state *tok)
else {
rc = tok_underflow_file(tok);
}
#if defined(Py_DEBUG)
if (Py_DebugFlag) {
printf("line[%d] = ", tok->lineno);
print_escape(stdout, tok->cur, tok->inp - tok->cur);
printf(" tok->done = %d\n", tok->done);
}
#endif
if (!rc) {
tok->cur = tok->inp;
return EOF;