mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-119613: Use C99+ functions instead of Py_IS_NAN/INFINITY/FINITE (#119619)
This commit is contained in:
parent
86d1a1aa88
commit
cd11ff12ac
12 changed files with 140 additions and 142 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue