summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-08-13 18:40:32 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-08-13 18:40:32 (GMT)
commite58bffb8ae6c48670a3953e59a25b14a9477ff7b (patch)
treeb6957f145791837cca41c426a47f1888cbb208fe /Modules/_pickle.c
parent3c7e928098d874d82f1069fca640d20afca84c02 (diff)
downloadcpython-e58bffb8ae6c48670a3953e59a25b14a9477ff7b.zip
cpython-e58bffb8ae6c48670a3953e59a25b14a9477ff7b.tar.gz
cpython-e58bffb8ae6c48670a3953e59a25b14a9477ff7b.tar.bz2
Followup to 8e824e09924a: fix regression on 32-bit builds
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 5952c1b..adc35f1 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -1540,8 +1540,11 @@ save_long(PicklerObject *self, PyObject *obj)
/* out of range for int pickling */
PyErr_Clear();
}
- else if (val <= 0x7fffffffL && val >= -0x80000000L)
- return save_int(self, val);
+ else
+#if SIZEOF_LONG > 4
+ if (val <= 0x7fffffffL && val >= -0x80000000L)
+#endif
+ return save_int(self, val);
if (self->proto >= 2) {
/* Linear-time pickling. */