[Python-checkins] r87825 - python/branches/py3k/Parser/tokenizer.c

victor.stinner python-checkins at python.org
Fri Jan 7 19:56:20 CET 2011


Author: victor.stinner
Date: Fri Jan  7 19:56:19 2011
New Revision: 87825

Log:
Issue #10841: don't translate newlines for pgen

Modified:
   python/branches/py3k/Parser/tokenizer.c

Modified: python/branches/py3k/Parser/tokenizer.c
==============================================================================
--- python/branches/py3k/Parser/tokenizer.c	(original)
+++ python/branches/py3k/Parser/tokenizer.c	Fri Jan  7 19:56:19 2011
@@ -892,6 +892,7 @@
         }
         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 @@
                     return EOF;
                 newtok = translated;
             }
-#ifndef PGEN
             if (tok->encoding && newtok && *newtok) {
                 /* Recode to UTF-8 */
                 Py_ssize_t buflen;


More information about the Python-checkins mailing list