mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
Renamed PyBytes to PyByteArray
This commit is contained in:
parent
96d02f3c1e
commit
9c4756ea26
31 changed files with 397 additions and 397 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue