Renamed PyBytes to PyByteArray

This commit is contained in:
Christian Heimes 2008-05-26 13:22:05 +00:00
parent 96d02f3c1e
commit 9c4756ea26
31 changed files with 397 additions and 397 deletions

View file

@ -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);