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.
This commit is contained in:
Serhiy Storchaka 2018-06-11 15:01:47 +03:00 committed by GitHub
parent 9d6171ded5
commit 5cbefa9919
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 9 deletions

View file

@ -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))