diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-31 06:09:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 06:09:36 (GMT) |
commit | 48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 (patch) | |
tree | 6678ae7f56e368ef192b8e0f5988f7c317dbb246 /Objects/floatobject.c | |
parent | dc9039da239ee572eaaf56e4a026be1fc4d74e24 (diff) | |
download | cpython-48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202.zip cpython-48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202.tar.gz cpython-48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202.tar.bz2 |
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r-- | Objects/floatobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 37dd67e..5954d39 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -428,7 +428,7 @@ float_richcompare(PyObject *v, PyObject *w, int op) j = PyFloat_AS_DOUBLE(w); else if (!Py_IS_FINITE(i)) { - if (PyInt_Check(w) || PyLong_Check(w)) + if (_PyAnyInt_Check(w)) /* If i is an infinity, its magnitude exceeds any * finite integer, so it doesn't matter which int we * compare i with. If i is a NaN, similarly. |