mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
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:
parent
8f6aa48cb2
commit
ae78ffdc93
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue