mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue