]> granicus.if.org Git - python/commitdiff
Followup to 8e824e09924a: fix regression on 32-bit builds
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 13 Aug 2011 18:40:32 +0000 (20:40 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 13 Aug 2011 18:40:32 +0000 (20:40 +0200)
Modules/_pickle.c

index 5952c1bf7a319bf40b4428f9b7f9f7bb66325503..adc35f18bd41863522e207d042e175b92e33af57 100644 (file)
@@ -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. */