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:
Victor Stinner 2022-02-25 01:32:57 +01:00 committed by GitHub
parent 5f8b5e2f21
commit 1b2611eb02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 16 additions and 28 deletions

View file

@ -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) {