mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +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
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue