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

(cherry picked from commit 86dfb55d2e)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-10-22 03:14:47 -07:00 committed by GitHub
parent 8f6aa48cb2
commit ae78ffdc93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1042,11 +1042,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;