diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-03-09 12:02:59 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-03-09 12:02:59 (GMT) |
commit | c8bb9eba31bb9352b1fdf19da490b3238fe8cb3e (patch) | |
tree | bf20debcd43817525827ad61ae5d97b236adc5be /Objects/longobject.c | |
parent | 27761f39a51bdbe716dbc8221ea80c9652be150a (diff) | |
download | cpython-c8bb9eba31bb9352b1fdf19da490b3238fe8cb3e.zip cpython-c8bb9eba31bb9352b1fdf19da490b3238fe8cb3e.tar.gz cpython-c8bb9eba31bb9352b1fdf19da490b3238fe8cb3e.tar.bz2 |
Patch #494047: removes 64-bit ?: to cope on plan9.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index f3e7df7..c17d56f 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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 |