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

@ -113,7 +113,7 @@ c_infj(void)
return r;
}
#if _PY_SHORT_FLOAT_REPR == 1 || defined(Py_NAN)
#if _PY_SHORT_FLOAT_REPR == 1
static double
m_nan(void)
@ -1282,7 +1282,7 @@ cmath_exec(PyObject *mod)
PyComplex_FromCComplex(c_infj())) < 0) {
return -1;
}
#if _PY_SHORT_FLOAT_REPR == 1 || defined(Py_NAN)
#if _PY_SHORT_FLOAT_REPR == 1
if (PyModule_AddObject(mod, "nan", PyFloat_FromDouble(m_nan())) < 0) {
return -1;
}