((obj)->ob_type->tp_iternext != NULL && \
(obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
#else
-PyAPI_FUNC(int) PyIter_Check(PyObject*);
+PyAPI_FUNC(int) PyIter_Check(PyObject *);
#endif
/* Takes an iterator object and calls its tp_iternext slot,
#ifndef Py_LIMITED_API
#define PyExceptionClass_Name(x) \
- ((char *)(((PyTypeObject*)(x))->tp_name))
+ ((char *)(((PyTypeObject *)(x))->tp_name))
#else
- PyAPI_FUNC(char *) PyExceptionClass_Name(PyObject*);
+ PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *);
#endif
#define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type))
Seven macro incompatibilities with the Limited API were fixed, and the
macros PyIter_Check, PyIndex_Check and PyExceptionClass_Name were added as
-functions. A script for automatic macro checks was added.
+functions. The return type of PyExceptionClass_Name is "const char \*".
+A script for automatic macro checks was added.
}
#undef PyIndex_Check
+
int
PyIndex_Check(PyObject *obj)
{
}
#undef PyIter_Check
+
int PyIter_Check(PyObject *obj)
{
return obj->ob_type->tp_iternext != NULL &&
}
#undef PyExceptionClass_Name
+
char *
PyExceptionClass_Name(PyObject *ob)
{