diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2021-10-22 08:52:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 08:52:24 (GMT) |
commit | 86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81 (patch) | |
tree | 6af370121f6401efe6ac6ffcde76ec53b3a3257b /Parser/tokenizer.c | |
parent | 276468dddb46c54980c782c09cdb53bd90755752 (diff) | |
download | cpython-86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81.zip cpython-86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81.tar.gz cpython-86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81.tar.bz2 |
bpo-45562: Only show debug output from the parser in debug builds (GH-29140)
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r-- | Parser/tokenizer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index ae3874b..789a10b 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -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; |