]> granicus.if.org Git - python/commitdiff
Patch #494047: removes 64-bit ?: to cope on plan9.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 9 Mar 2002 12:02:59 +0000 (12:02 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 9 Mar 2002 12:02:59 +0000 (12:02 +0000)
Objects/longobject.c

index f3e7df7134285eb1757bfd14845f95ab21126f98..c17d56f12c95ef26b088cd5d7f38d8482779e8f1 100644 (file)
@@ -694,7 +694,11 @@ PyLong_AsLongLong(PyObject *vv)
                        (PyLongObject *)vv, (unsigned char *)&bytes,
                        SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 1);
 
-       return res < 0 ? (LONG_LONG)res : bytes;
+       /* Plan 9 can't handle LONG_LONG in ? : expressions */
+       if (res < 0)
+               return (LONG_LONG)res;
+       else
+               return bytes;
 }
 
 /* Get a C unsigned LONG_LONG int from a long int object.
@@ -716,7 +720,11 @@ PyLong_AsUnsignedLongLong(PyObject *vv)
                        (PyLongObject *)vv, (unsigned char *)&bytes,
                        SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 0);
 
-       return res < 0 ? (unsigned LONG_LONG)res : bytes;
+       /* Plan 9 can't handle LONG_LONG in ? : expressions */
+       if (res < 0)
+               return (unsigned LONG_LONG)res;
+       else
+               return bytes;
 }
 
 #undef IS_LITTLE_ENDIAN