From 1b2611eb0283055835e5df632a7a735db8c894b8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 25 Feb 2022 01:32:57 +0100 Subject: 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. --- Objects/floatobject.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'Objects/floatobject.c') diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 64d4c3e5a8..6d796566c4 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -2486,15 +2486,7 @@ _PyFloat_Unpack2(const unsigned char *p, int le) } else { /* NaN */ -#ifdef Py_NAN return sign ? -Py_NAN : Py_NAN; -#else - PyErr_SetString( - PyExc_ValueError, - "can't unpack IEEE 754 NaN " - "on platform that does not support NaNs"); - return -1; -#endif // !defined(Py_NAN) } #else // _PY_SHORT_FLOAT_REPR == 1 if (f == 0) { -- cgit v1.2.1