summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.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 /Python/bltinmodule.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 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 9ce3b27..f19115d 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1780,7 +1780,7 @@ get_range_long_argument(PyObject *arg, const char *name)
{
PyObject *v;
PyNumberMethods *nb;
- if (PyInt_Check(arg) || PyLong_Check(arg)) {
+ if (_PyAnyInt_Check(arg)) {
Py_INCREF(arg);
return arg;
}
@@ -1795,7 +1795,7 @@ get_range_long_argument(PyObject *arg, const char *name)
v = nb->nb_int(arg);
if (v == NULL)
return NULL;
- if (PyInt_Check(v) || PyLong_Check(v))
+ if (_PyAnyInt_Check(v))
return v;
Py_DECREF(v);
PyErr_SetString(PyExc_TypeError,