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/pyhash.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/pyhash.c')
| -rw-r--r-- | Python/pyhash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pyhash.c b/Python/pyhash.c index 5263622..4145d9e 100644 --- a/Python/pyhash.c +++ b/Python/pyhash.c @@ -90,8 +90,8 @@ _Py_HashDouble(PyObject *inst, double v) double m; Py_uhash_t x, y; - if (!Py_IS_FINITE(v)) { - if (Py_IS_INFINITY(v)) + if (!isfinite(v)) { + if (isinf(v)) return v > 0 ? _PyHASH_INF : -_PyHASH_INF; else return PyObject_GenericHash(inst); |
