Followup to 8e824e09924a: fix regression on 32-bit builds

This commit is contained in:
Antoine Pitrou 2011-08-13 20:40:32 +02:00
parent 3c7e928098
commit e58bffb8ae
1 changed files with 5 additions and 2 deletions

View File

@ -1540,8 +1540,11 @@ save_long(PicklerObject *self, PyObject *obj)
/* out of range for int pickling */ /* out of range for int pickling */
PyErr_Clear(); PyErr_Clear();
} }
else if (val <= 0x7fffffffL && val >= -0x80000000L) else
return save_int(self, val); #if SIZEOF_LONG > 4
if (val <= 0x7fffffffL && val >= -0x80000000L)
#endif
return save_int(self, val);
if (self->proto >= 2) { if (self->proto >= 2) {
/* Linear-time pickling. */ /* Linear-time pickling. */