summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-09-06 21:34:51 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-09-06 21:34:51 (GMT)
commit0a608fdaac5b4422b9ade6ec7b44182902f2f9ce (patch)
tree80f50c009d21accfd42b8a736ce9761370169995 /Python
parent7e958d1ceb0b92fa7bace7040ce042474d3ea510 (diff)
downloadcpython-0a608fdaac5b4422b9ade6ec7b44182902f2f9ce.zip
cpython-0a608fdaac5b4422b9ade6ec7b44182902f2f9ce.tar.gz
cpython-0a608fdaac5b4422b9ade6ec7b44182902f2f9ce.tar.bz2
fixes deferred/release blocker issue #3797: Fixed the dbm, marshal, mmap,
ossaudiodev, & winreg modules to return bytes objects instead of bytearray objects.
Diffstat (limited to 'Python')
-rw-r--r--Python/marshal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index d3f2d7f..e7981b8 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1093,7 +1093,7 @@ PyMarshal_WriteObjectToString(PyObject *x, int version)
}
if (wf.str != NULL) {
/* XXX Quick hack -- need to do this differently */
- res = PyByteArray_FromObject(wf.str);
+ res = PyBytes_FromObject(wf.str);
Py_DECREF(wf.str);
}
return res;
@@ -1134,9 +1134,9 @@ marshal_load(PyObject *self, PyObject *f)
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 if (PyBytes_Check(data)) {
+ rf.ptr = PyBytes_AS_STRING(data);
+ rf.end = rf.ptr + PyBytes_GET_SIZE(data);
}
else {
PyErr_Format(PyExc_TypeError,