mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Patch #494047: removes 64-bit ?: to cope on plan9.
This commit is contained in:
parent
27761f39a5
commit
c8bb9eba31
1 changed files with 10 additions and 2 deletions
|
@ -694,7 +694,11 @@ PyLong_AsLongLong(PyObject *vv)
|
||||||
(PyLongObject *)vv, (unsigned char *)&bytes,
|
(PyLongObject *)vv, (unsigned char *)&bytes,
|
||||||
SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 1);
|
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.
|
/* 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,
|
(PyLongObject *)vv, (unsigned char *)&bytes,
|
||||||
SIZEOF_LONG_LONG, IS_LITTLE_ENDIAN, 0);
|
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
|
#undef IS_LITTLE_ENDIAN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue