]> granicus.if.org Git - python/commitdiff
Use compile-time test for 64-bit hardware instead of run-time test.
authorGuido van Rossum <guido@python.org>
Tue, 13 May 1997 18:00:44 +0000 (18:00 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 13 May 1997 18:00:44 +0000 (18:00 +0000)
This silences some compilers.

Modules/cPickle.c

index abe7d67ebc41ce92141cf05d2c64ae1ea92d508e..56a0fac87a8d4a42716c50444b964a3c50a229c7 100644 (file)
@@ -675,7 +675,11 @@ save_int(Picklerobject *self, PyObject *args) {
     long l = PyInt_AS_LONG((PyIntObject *)args);
     int len = 0;
 
-    if (!self->bin || sizeof(long) == 8 && (l >> 32)) {
+    if (!self->bin
+#if SIZEOF_LONG > 4
+       || (l >> 32)
+#endif
+           ) {
                /* Save extra-long ints in non-binary mode, so that
                   we can use python long parsing code to restore,
                   if necessary. */
@@ -3869,6 +3873,10 @@ initcPickle() {
 
 /****************************************************************************
  $Log$
+ Revision 2.6  1997/05/13 18:00:44  guido
+ Use compile-time test for 64-bit hardware instead of run-time test.
+ This silences some compilers.
+
  Revision 2.5  1997/05/07 17:46:13  guido
  Instead of importing graminit.h whenever one of the three grammar 'root'
  symbols is needed, define these in Python.h with a Py_ prefix.