summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-01-31 21:10:31 (GMT)
committerGuido van Rossum <guido@python.org>2003-01-31 21:10:31 (GMT)
commit8e0ad0cb0bec01a4216230d1003e24fe8c7ab3c7 (patch)
treec056be33c2bb0c9ed812e7a617989a11dbe03cb6 /Modules
parentdda583df9a4610d99b99dab961c0f06a2a472e3d (diff)
downloadcpython-8e0ad0cb0bec01a4216230d1003e24fe8c7ab3c7.zip
cpython-8e0ad0cb0bec01a4216230d1003e24fe8c7ab3c7.tar.gz
cpython-8e0ad0cb0bec01a4216230d1003e24fe8c7ab3c7.tar.bz2
Ignore the state returned by __reduce__ if it is Py_None.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cPickle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index 24a9f13..08bb8e8 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -2086,6 +2086,8 @@ save(Picklerobject *self, PyObject *args, int pers_save)
if (size > 2) {
state = PyTuple_GET_ITEM(t, 2);
+ if (state == Py_None)
+ state = NULL;
}
if (!( PyTuple_Check(arg_tup) || arg_tup==Py_None )) {