[Python-checkins] cpython: Followup to 8e824e09924a: fix regression on 32-bit builds

antoine.pitrou python-checkins at python.org
Sat Aug 13 20:42:35 CEST 2011


http://hg.python.org/cpython/rev/72aaaff280d1
changeset:   71861:72aaaff280d1
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Aug 13 20:40:32 2011 +0200
summary:
  Followup to 8e824e09924a: fix regression on 32-bit builds

files:
  Modules/_pickle.c |  7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)


diff --git a/Modules/_pickle.c b/Modules/_pickle.c
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -1540,8 +1540,11 @@
         /* 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. */

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list