bpo-33818: PyExceptionClass_Name() will now return "const char *". (GH-7581)

This commit is contained in:
Serhiy Storchaka 2018-06-15 11:09:43 +03:00 committed by GitHub
parent 08f127a3ca
commit ceeef10cdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 9 deletions

View file

@ -344,10 +344,10 @@ PyException_SetContext(PyObject *self, PyObject *context)
#undef PyExceptionClass_Name
char *
const char *
PyExceptionClass_Name(PyObject *ob)
{
return (char *)((PyTypeObject*)ob)->tp_name;
return ((PyTypeObject*)ob)->tp_name;
}
static struct PyMemberDef BaseException_members[] = {