summaryrefslogtreecommitdiffstats
path: root/Parser/tokenizer.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-01-07 18:56:19 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-01-07 18:56:19 (GMT)
commit034c7537d8b7f62ba9eff6a9fe8989730cce26f2 (patch)
tree47cf7b07ee7b66e7862b65459a63b20eac430ca4 /Parser/tokenizer.c
parent89e343660623862acbd40cc617b4af262d6c799f (diff)
downloadcpython-034c7537d8b7f62ba9eff6a9fe8989730cce26f2.zip
cpython-034c7537d8b7f62ba9eff6a9fe8989730cce26f2.tar.gz
cpython-034c7537d8b7f62ba9eff6a9fe8989730cce26f2.tar.bz2
Issue #10841: don't translate newlines for pgen
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r--Parser/tokenizer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 1eb62aa..3f6be2f 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -892,6 +892,7 @@ tok_nextc(register struct tok_state *tok)
}
if (tok->prompt != NULL) {
char *newtok = PyOS_Readline(stdin, stdout, tok->prompt);
+#ifndef PGEN
if (newtok != NULL) {
char *translated = translate_newlines(newtok, 0, tok);
PyMem_FREE(newtok);
@@ -899,7 +900,6 @@ tok_nextc(register struct tok_state *tok)
return EOF;
newtok = translated;
}
-#ifndef PGEN
if (tok->encoding && newtok && *newtok) {
/* Recode to UTF-8 */
Py_ssize_t buflen;