From e58bffb8ae6c48670a3953e59a25b14a9477ff7b Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 13 Aug 2011 20:40:32 +0200 Subject: [PATCH] Followup to 8e824e09924a: fix regression on 32-bit builds --- Modules/_pickle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 5952c1bf7a3..adc35f18bd4 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. */