From: Antoine Pitrou Date: Sat, 13 Aug 2011 18:40:32 +0000 (+0200) Subject: Followup to 8e824e09924a: fix regression on 32-bit builds X-Git-Tag: v3.3.0a1~1697 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e58bffb8ae6c48670a3953e59a25b14a9477ff7b;p=thirdparty%2FPython%2Fcpython.git Followup to 8e824e09924a: fix regression on 32-bit builds --- diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 5952c1bf7a31..adc35f18bd41 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. */