From 48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 31 Jul 2018 09:09:36 +0300 Subject: [2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479) --- Python/Python-ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/Python-ast.c') diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 4ac5cf578f..2e7a1afbbc 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -617,7 +617,7 @@ static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena) static int obj2ast_int(PyObject* obj, int* out, PyArena* arena) { int i; - if (!PyInt_Check(obj) && !PyLong_Check(obj)) { + if (!_PyAnyInt_Check(obj)) { PyObject *s = PyObject_Repr(obj); if (s == NULL) return 1; PyErr_Format(PyExc_ValueError, "invalid integer value: %.400s", -- cgit v1.2.1