diff options
author | Victor Stinner <vstinner@python.org> | 2022-02-25 00:32:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-25 00:32:57 (GMT) |
commit | 1b2611eb0283055835e5df632a7a735db8c894b8 (patch) | |
tree | e9333a50ad80b2e1f622d8baf83273c68c085bb3 /Modules | |
parent | 5f8b5e2f2150d2223ff9e286bd146de92ff16865 (diff) | |
download | cpython-1b2611eb0283055835e5df632a7a735db8c894b8.zip cpython-1b2611eb0283055835e5df632a7a735db8c894b8.tar.gz cpython-1b2611eb0283055835e5df632a7a735db8c894b8.tar.bz2 |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/cmathmodule.c | 4 | ||||
-rw-r--r-- | Modules/mathmodule.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c index c0c0c35..2038ac2 100644 --- a/Modules/cmathmodule.c +++ b/Modules/cmathmodule.c @@ -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; } diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 24ae146..f0aaf23 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -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; } |