From ceeef10cdbc08561f9954e13bbed1cb2299a8c72 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 15 Jun 2018 11:09:43 +0300 Subject: bpo-33818: PyExceptionClass_Name() will now return "const char *". (GH-7581) --- Include/pyerrors.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Include/pyerrors.h') diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 5b626584bb..416d750d9b 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -140,10 +140,9 @@ 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 *); +PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *); #ifndef Py_LIMITED_API -#define PyExceptionClass_Name(x) \ - ((char *)(((PyTypeObject *)(x))->tp_name)) +#define PyExceptionClass_Name(x) (((PyTypeObject*)(x))->tp_name) #endif #define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type)) -- cgit v1.2.1