summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-07-31 06:09:36 (GMT)
committerGitHub <noreply@github.com>2018-07-31 06:09:36 (GMT)
commit48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 (patch)
tree6678ae7f56e368ef192b8e0f5988f7c317dbb246 /Objects/classobject.c
parentdc9039da239ee572eaaf56e4a026be1fc4d74e24 (diff)
downloadcpython-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/classobject.c')
-rw-r--r--Objects/classobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 5b64578..02d7cfd 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -1009,7 +1009,7 @@ instance_hash(PyInstanceObject *inst)
Py_DECREF(func);
if (res == NULL)
return -1;
- if (PyInt_Check(res) || PyLong_Check(res))
+ if (_PyAnyInt_Check(res))
/* This already converts a -1 result to -2. */
outcome = Py_TYPE(res)->tp_hash(res);
else {