[Python-checkins] cpython (3.2): fix compiler compliant about \0 not being an opcode
benjamin.peterson
python-checkins at python.org
Fri Sep 23 19:53:10 CEST 2011
http://hg.python.org/cpython/rev/db8027df8458
changeset: 72457:db8027df8458
branch: 3.2
parent: 72453:125887a41a6f
user: Benjamin Peterson <benjamin at python.org>
date: Fri Sep 23 13:41:41 2011 -0400
summary:
fix compiler compliant about \0 not being an opcode
files:
Modules/_pickle.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -5298,13 +5298,12 @@
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;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list