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

diff --git a/Objects/enumobject.c b/Objects/enumobject.c
index 8f86a5b..73b656b 100644
--- a/Objects/enumobject.c
+++ b/Objects/enumobject.c
@@ -31,7 +31,7 @@
             Py_DECREF(en);
             return NULL;
         }
-        assert(PyInt_Check(start) || PyLong_Check(start));
+        assert(_PyAnyInt_Check(start));
         en->en_index = PyInt_AsSsize_t(start);
         if (en->en_index == -1 && PyErr_Occurred()) {
             PyErr_Clear();