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

guido.van.rossum python-3000-checkins at python.org
Wed Oct 10 20:49:50 CEST 2007


Author: guido.van.rossum
Date: Wed Oct 10 20:49:50 2007
New Revision: 58409

Modified:
   python/branches/py3k/Parser/tokenizer.c
Log:
Fix another stray PyString reference that should be PyBytes; and its comment.


Modified: python/branches/py3k/Parser/tokenizer.c
==============================================================================
--- python/branches/py3k/Parser/tokenizer.c	(original)
+++ python/branches/py3k/Parser/tokenizer.c	Wed Oct 10 20:49:50 2007
@@ -357,7 +357,7 @@
      1) NULL: need to call tok->decoding_readline to get a new line
      2) PyUnicodeObject *: decoding_feof has called tok->decoding_readline and
            stored the result in tok->decoding_buffer
-     3) PyStringObject *: previous call to fp_readl did not have enough room
+     3) PyBytesObject *: previous call to fp_readl did not have enough room
            (in the s buffer) to copy entire contents of the line read
            by tok->decoding_readline.  tok->decoding_buffer has the overflow.
            In this case, fp_readl is called in a loop (with an expanded buffer)
@@ -625,7 +625,7 @@
 		utf8 = translate_into_utf8(str, tok->enc);
 		if (utf8 == NULL)
 			return error_ret(tok);
-		str = PyString_AsString(utf8);
+		str = PyBytes_AsString(utf8);
 	}
 	for (s = str;; s++) {
 		if (*s == '\0') break;


More information about the Python-3000-checkins mailing list