diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-07-25 16:18:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-25 16:18:20 (GMT) |
commit | 25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17 (patch) | |
tree | e080f611ba9e8a7e211af2032956004a61bc3f07 /Modules | |
parent | 69802f6163c9f18ca0e0b9c4c43a49365fc63e2d (diff) | |
download | cpython-25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17.zip cpython-25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17.tar.gz cpython-25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17.tar.bz2 |
bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)
(cherry picked from commit 898318b53d921298d1f1fcfa0f415844afbeb318)
Co-authored-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
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 0a59757..bbe2603 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 { |