diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index a5e35d93fd2..d5971226b18 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -898,7 +898,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena) return 1; } - i = (int)PyLong_AsLong(obj); + i = _PyLong_AsInt(obj); if (i == -1 && PyErr_Occurred()) return 1; *out = i;