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

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;