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

@ -283,7 +283,7 @@ m_inf(void)
/* Constant nan value, generated in the same way as float('nan'). */
/* We don't currently assume that Py_NAN is defined everywhere. */
#if _PY_SHORT_FLOAT_REPR == 1 || defined(Py_NAN)
#if _PY_SHORT_FLOAT_REPR == 1
static double
m_nan(void)
@ -3838,7 +3838,7 @@ math_exec(PyObject *module)
if (PyModule_AddObject(module, "inf", PyFloat_FromDouble(m_inf())) < 0) {
return -1;
}
#if _PY_SHORT_FLOAT_REPR == 1 || defined(Py_NAN)
#if _PY_SHORT_FLOAT_REPR == 1
if (PyModule_AddObject(module, "nan", PyFloat_FromDouble(m_nan())) < 0) {
return -1;
}