summaryrefslogtreecommitdiffstats
path: root/Modules/cPickle.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-15 03:35:38 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-15 03:35:38 (GMT)
commitaa588c4699877fd812c59debee71aa704b8f6dd4 (patch)
treefbade3f8b63d8b5cc68bd42664466c4cd5195981 /Modules/cPickle.c
parenta092947d26758d39c30c42eb62bdaf02776e7913 (diff)
downloadcpython-aa588c4699877fd812c59debee71aa704b8f6dd4.zip
cpython-aa588c4699877fd812c59debee71aa704b8f6dd4.tar.gz
cpython-aa588c4699877fd812c59debee71aa704b8f6dd4.tar.bz2
Fix some problems introduced by the str8 repr change.
Diffstat (limited to 'Modules/cPickle.c')
-rw-r--r--Modules/cPickle.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index f0b3c8a..0085560 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -1085,6 +1085,10 @@ save_string(Picklerobject *self, PyObject *args, int doput)
goto err;
repr_str = PyString_AS_STRING((PyStringObject *)repr);
+ /* Strip leading 's' due to repr() of str8() returning s'...' */
+ if (repr_str[0] == 's')
+ repr_str++;
+
if (self->write_func(self, &string, 1) < 0)
goto err;