diff options
| author | Sergey B Kirpichev <skirpichev@gmail.com> | 2024-05-29 07:51:19 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-29 07:51:19 (GMT) |
| commit | cd11ff12ac55f37d38b5ef08c143c78f07da5717 (patch) | |
| tree | 10a05f34466399302791c3bda940ac67170cf64f /Python/pytime.c | |
| parent | 86d1a1aa8841ea182eaf434ae6b942b3e93f58db (diff) | |
| download | cpython-cd11ff12ac55f37d38b5ef08c143c78f07da5717.zip cpython-cd11ff12ac55f37d38b5ef08c143c78f07da5717.tar.gz cpython-cd11ff12ac55f37d38b5ef08c143c78f07da5717.tar.bz2 | |
gh-119613: Use C99+ functions instead of Py_IS_NAN/INFINITY/FINITE (#119619)
Diffstat (limited to 'Python/pytime.c')
| -rw-r--r-- | Python/pytime.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pytime.c b/Python/pytime.c index 560aea3..cd76970 100644 --- a/Python/pytime.c +++ b/Python/pytime.c @@ -375,7 +375,7 @@ pytime_object_to_denominator(PyObject *obj, time_t *sec, long *numerator, if (PyFloat_Check(obj)) { double d = PyFloat_AsDouble(obj); - if (Py_IS_NAN(d)) { + if (isnan(d)) { *numerator = 0; PyErr_SetString(PyExc_ValueError, "Invalid value NaN (not a number)"); return -1; @@ -403,7 +403,7 @@ _PyTime_ObjectToTime_t(PyObject *obj, time_t *sec, _PyTime_round_t round) volatile double d; d = PyFloat_AsDouble(obj); - if (Py_IS_NAN(d)) { + if (isnan(d)) { PyErr_SetString(PyExc_ValueError, "Invalid value NaN (not a number)"); return -1; } @@ -590,7 +590,7 @@ pytime_from_object(PyTime_t *tp, PyObject *obj, _PyTime_round_t round, if (PyFloat_Check(obj)) { double d; d = PyFloat_AsDouble(obj); - if (Py_IS_NAN(d)) { + if (isnan(d)) { PyErr_SetString(PyExc_ValueError, "Invalid value NaN (not a number)"); return -1; } |
