summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-07-18 02:28:27 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-07-18 02:28:27 (GMT)
commit10a60b3ec0cdf7eeac98258fc53a33b7026f8ff3 (patch)
tree533e2a67c2c082cd9534c70293977f9245425188 /Objects/bytesobject.c
parent6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (diff)
downloadcpython-10a60b3ec0cdf7eeac98258fc53a33b7026f8ff3.zip
cpython-10a60b3ec0cdf7eeac98258fc53a33b7026f8ff3.tar.gz
cpython-10a60b3ec0cdf7eeac98258fc53a33b7026f8ff3.tar.bz2
Change Py_BuildValue to generate Unicode objects for
's' and 'c' codes. Change pickle to dump bytes objects using the 'S' code, and to load the 'S' code as byte objects. Change datetime and array to generate and expect bytes objects in reduce/unreduce.
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 532e637..6340b46 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -2724,6 +2724,9 @@ PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
static PyObject *
bytes_reduce(PyBytesObject *self)
{
+ /* XXX: This currently returns a Py_UNICODE-widened string
+ in the tuple which is completely useless. Pickle stopped
+ using it for that reason. */
return Py_BuildValue("(O(s#))",
self->ob_type,
self->ob_bytes == NULL ? "" : self->ob_bytes,