[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)

This commit is contained in:
Serhiy Storchaka
2018-07-31 09:09:36 +03:00
committed by GitHub
parent dc9039da23
commit 48c8bf21f9
36 changed files with 75 additions and 81 deletions

View File

@@ -4504,7 +4504,7 @@ PyString_Format(PyObject *format, PyObject *args)
if (PyNumber_Check(v)) {
PyObject *iobj=NULL;
if (PyInt_Check(v) || (PyLong_Check(v))) {
if (_PyAnyInt_Check(v)) {
iobj = v;
Py_INCREF(iobj);
}