mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
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:
parent
9d6171ded5
commit
5cbefa9919
4 changed files with 6 additions and 9 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue