summaryrefslogtreecommitdiffstats
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 (GMT)
commit9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (patch)
tree642b21e774a9cb2d949e10ce65e7d10326c70138 /Python/codecs.c
parent96d02f3c1e145821cd5ce8817d4263e7d8d57e4a (diff)
downloadcpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.zip
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.gz
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.bz2
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 86941b1..554c1d2 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -345,7 +345,7 @@ PyObject *PyCodec_Encode(PyObject *object,
goto onError;
}
v = PyTuple_GET_ITEM(result, 0);
- if (PyBytes_Check(v)) {
+ if (PyByteArray_Check(v)) {
char msg[100];
PyOS_snprintf(msg, sizeof(msg),
"encoder %s returned buffer instead of bytes",
@@ -354,7 +354,7 @@ PyObject *PyCodec_Encode(PyObject *object,
v = NULL;
goto onError;
}
- v = PyString_FromStringAndSize(PyBytes_AS_STRING(v), Py_SIZE(v));
+ v = PyString_FromStringAndSize(PyByteArray_AS_STRING(v), Py_SIZE(v));
}
else if (PyString_Check(v))
Py_INCREF(v);