Clean up after bpo-33738. (GH-7627)
* Add declarations even if they are overridden by macros.
* Make the declaration and the definition of PyExceptionClass_Name
consistent.
diff --git a/Include/abstract.h b/Include/abstract.h
index c1297db..85550a3 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -593,12 +593,11 @@
/* Returns 1 if the object 'obj' provides iterator protocols, and 0 otherwise.
This function always succeeds. */
+PyAPI_FUNC(int) PyIter_Check(PyObject *);
#ifndef Py_LIMITED_API
#define PyIter_Check(obj) \
((obj)->ob_type->tp_iternext != NULL && \
(obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
-#else
-PyAPI_FUNC(int) PyIter_Check(PyObject *);
#endif
/* Takes an iterator object and calls its tp_iternext slot,
@@ -719,12 +718,11 @@
/* Returns 1 if obj is an index integer (has the nb_index slot of the
tp_as_number structure filled in), and 0 otherwise. */
+PyAPI_FUNC(int) PyIndex_Check(PyObject *);
#ifndef Py_LIMITED_API
#define PyIndex_Check(obj) \
((obj)->ob_type->tp_as_number != NULL && \
(obj)->ob_type->tp_as_number->nb_index != NULL)
-#else
-PyAPI_FUNC(int) PyIndex_Check(PyObject *);
#endif
/* Returns the object 'o' converted to a Python int, or NULL with an exception