summaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 +0000
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 +0000
commit7f6f3da7105c7fc7d0d29f8ccb30c65edeaddb65 (patch)
tree8caac0431ce3dcf851706adbc7709c288c3e7697 /Parser
parent936646d98c8bcddb7966ab8785af03be664f1ca2 (diff)
downloadcpython-7f6f3da7105c7fc7d0d29f8ccb30c65edeaddb65.tar.gz
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Parser')
-rw-r--r--Parser/tokenizer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 9de0846c92..550d224d00 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -360,7 +360,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) PyBytesObject *: previous call to fp_readl did not have enough room
+ 3) PyByteArrayObject *: 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)
@@ -398,17 +398,17 @@ fp_readl(char *s, int size, struct tok_state *tok)
}
else
{
- buf = PyBytes_AsString(bufobj);
+ buf = PyByteArray_AsString(bufobj);
if (buf == NULL) {
goto error;
}
- buflen = PyBytes_GET_SIZE(bufobj);
+ buflen = PyByteArray_GET_SIZE(bufobj);
}
Py_XDECREF(tok->decoding_buffer);
if (buflen > size) {
/* Too many chars, the rest goes into tok->decoding_buffer */
- tok->decoding_buffer = PyBytes_FromStringAndSize(buf+size,
+ tok->decoding_buffer = PyByteArray_FromStringAndSize(buf+size,
buflen-size);
if (tok->decoding_buffer == NULL)
goto error;