Issue #10841: don't translate newlines for pgen

This commit is contained in:
Victor Stinner 2011-01-07 18:56:19 +00:00
parent 89e3436606
commit 034c7537d8
1 changed files with 1 additions and 1 deletions

View File

@ -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;