summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-10 18:49:50 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-10 18:49:50 (GMT)
commitdf4ce10276819593089b7dc922401e24da8f8911 (patch)
treec213e2814b5b144a2441649eb08e07385d04d1c0
parent641591cffe09210b46b8f14b62831a17469995cd (diff)
downloadcpython-df4ce10276819593089b7dc922401e24da8f8911.zip
cpython-df4ce10276819593089b7dc922401e24da8f8911.tar.gz
cpython-df4ce10276819593089b7dc922401e24da8f8911.tar.bz2
Fix another stray PyString reference that should be PyBytes; and its comment.
-rw-r--r--Parser/tokenizer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index bb171c3..8f67e0e 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -357,7 +357,7 @@ check_bom(int get_char(struct tok_state *),
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 @@ decode_str(const char *str, struct tok_state *tok)
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;