mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Ignore the state returned by __reduce__ if it is Py_None.
This commit is contained in:
parent
dda583df9a
commit
8e0ad0cb0b
1 changed files with 2 additions and 0 deletions
|
|
@ -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 )) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue