bpo-33818: PyExceptionClass_Name() will now return "const char *". (GH-7581)
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 26f74c8..3d40c79 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -774,12 +774,12 @@
}
else {
PyObject* moduleName;
- char* className;
+ const char *className;
_Py_IDENTIFIER(__module__);
assert(PyExceptionClass_Check(type));
className = PyExceptionClass_Name(type);
if (className != NULL) {
- char *dot = strrchr(className, '.');
+ const char *dot = strrchr(className, '.');
if (dot != NULL)
className = dot+1;
}