diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/abstract.h | 6 | ||||
-rw-r--r-- | Include/pyerrors.h | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index c1297dbede..85550a34ca 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -593,12 +593,11 @@ PyAPI_FUNC(PyObject *) PyObject_GetIter(PyObject *); /* 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 @@ PyAPI_FUNC(PyObject *) PyNumber_Or(PyObject *o1, PyObject *o2); /* 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 diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 5fd981c2ba..5b626584bb 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -140,11 +140,10 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *); #define PyExceptionInstance_Check(x) \ PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS) +PyAPI_FUNC(char *) PyExceptionClass_Name(PyObject *); #ifndef Py_LIMITED_API #define PyExceptionClass_Name(x) \ ((char *)(((PyTypeObject *)(x))->tp_name)) -#else - PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *); #endif #define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type)) |