diff options
author | Guido van Rossum <guido@python.org> | 2003-01-31 21:10:31 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-01-31 21:10:31 (GMT) |
commit | 8e0ad0cb0bec01a4216230d1003e24fe8c7ab3c7 (patch) | |
tree | c056be33c2bb0c9ed812e7a617989a11dbe03cb6 /Modules/cPickle.c | |
parent | dda583df9a4610d99b99dab961c0f06a2a472e3d (diff) | |
download | cpython-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/cPickle.c')
-rw-r--r-- | Modules/cPickle.c | 2 |
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 )) { |