summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-02-25 00:32:57 (GMT)
committerGitHub <noreply@github.com>2022-02-25 00:32:57 (GMT)
commit1b2611eb0283055835e5df632a7a735db8c894b8 (patch)
treee9333a50ad80b2e1f622d8baf83273c68c085bb3 /Modules/mathmodule.c
parent5f8b5e2f2150d2223ff9e286bd146de92ff16865 (diff)
downloadcpython-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/mathmodule.c')
-rw-r--r--Modules/mathmodule.c4
1 files changed, 2 insertions, 2 deletions
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;
}