diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-09-23 17:41:41 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-09-23 17:41:41 (GMT) |
commit | adde86d0e31ce486e72a9d1a2a7625e5e34d97e9 (patch) | |
tree | f3b346fd2763f05fb92c3e7f6c1afa39e6d36881 /Modules | |
parent | 53ffdc53bf0500e402682d1459a9a8d06573664c (diff) | |
download | cpython-adde86d0e31ce486e72a9d1a2a7625e5e34d97e9.zip cpython-adde86d0e31ce486e72a9d1a2a7625e5e34d97e9.tar.gz cpython-adde86d0e31ce486e72a9d1a2a7625e5e34d97e9.tar.bz2 |
fix compiler compliant about \0 not being an opcode
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_pickle.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 20ee302..164d864 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -5298,13 +5298,12 @@ load(UnpicklerObject *self) case STOP: break; - case '\0': - PyErr_SetNone(PyExc_EOFError); - return NULL; - default: - PyErr_Format(UnpicklingError, - "invalid load key, '%c'.", s[0]); + if (s[0] == '\0') + PyErr_SetNone(PyExc_EOFError); + else + PyErr_Format(UnpicklingError, + "invalid load key, '%c'.", s[0]); return NULL; } |