diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2019-07-25 16:00:34 (GMT) |
---|---|---|
committer | Antoine Pitrou <antoine@python.org> | 2019-07-25 16:00:34 (GMT) |
commit | 898318b53d921298d1f1fcfa0f415844afbeb318 (patch) | |
tree | 51c73d039d014c234366ec0b6b07baf61f175f55 /Modules | |
parent | 93e8aa62cfd0a61efed4a61a2ffc2283ae986ef2 (diff) | |
download | cpython-898318b53d921298d1f1fcfa0f415844afbeb318.zip cpython-898318b53d921298d1f1fcfa0f415844afbeb318.tar.gz cpython-898318b53d921298d1f1fcfa0f415844afbeb318.tar.bz2 |
bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_pickle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 054276d..0c53f2e 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -1653,7 +1653,7 @@ _Unpickler_SetInputEncoding(UnpicklerObject *self, static int _Unpickler_SetBuffers(UnpicklerObject *self, PyObject *buffers) { - if (buffers == NULL) { + if (buffers == NULL || buffers == Py_None) { self->buffers = NULL; } else { |