summaryrefslogtreecommitdiffstats
path: root/Python/marshal.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/marshal.c
parent96d02f3c1e145821cd5ce8817d4263e7d8d57e4a (diff)
downloadcpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.zip
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.gz
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.bz2
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index ce828da..5672a06 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1095,7 +1095,7 @@ PyMarshal_WriteObjectToString(PyObject *x, int version)
}
if (wf.str != NULL) {
/* XXX Quick hack -- need to do this differently */
- res = PyBytes_FromObject(wf.str);
+ res = PyByteArray_FromObject(wf.str);
Py_DECREF(wf.str);
}
return res;
@@ -1136,9 +1136,9 @@ marshal_load(PyObject *self, PyObject *f)
rf.ptr = PyString_AS_STRING(data);
rf.end = rf.ptr + PyString_GET_SIZE(data);
}
- else if (PyBytes_Check(data)) {
- rf.ptr = PyBytes_AS_STRING(data);
- rf.end = rf.ptr + PyBytes_GET_SIZE(data);
+ else if (PyByteArray_Check(data)) {
+ rf.ptr = PyByteArray_AS_STRING(data);
+ rf.end = rf.ptr + PyByteArray_GET_SIZE(data);
}
else {
PyErr_Format(PyExc_TypeError,