mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-46656: Remove Py_NO_NAN macro (GH-31160)
Building Python now requires support for floating point Not-a-Number (NaN): remove the Py_NO_NAN macro.
This commit is contained in:
parent
5f8b5e2f21
commit
1b2611eb02
9 changed files with 16 additions and 28 deletions
|
@ -2486,15 +2486,7 @@ _PyFloat_Unpack2(const unsigned char *p, int le)
|
|||
}
|
||||
else {
|
||||
/* NaN */
|
||||
#ifdef Py_NAN
|
||||
return sign ? -Py_NAN : Py_NAN;
|
||||
#else
|
||||
PyErr_SetString(
|
||||
PyExc_ValueError,
|
||||
"can't unpack IEEE 754 NaN "
|
||||
"on platform that does not support NaNs");
|
||||
return -1;
|
||||
#endif // !defined(Py_NAN)
|
||||
}
|
||||
#else // _PY_SHORT_FLOAT_REPR == 1
|
||||
if (f == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue