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) --- Python/errors.c | 4 ++-- Python/pythonrun.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Python') diff --git a/Python/errors.c b/Python/errors.c index 15e6ba0571..98910b4490 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -947,7 +947,7 @@ PyErr_WriteUnraisable(PyObject *obj) _Py_IDENTIFIER(__module__); PyObject *f, *t, *v, *tb; PyObject *moduleName = NULL; - char* className; + const char *className; PyErr_Fetch(&t, &v, &tb); @@ -977,7 +977,7 @@ PyErr_WriteUnraisable(PyObject *obj) assert(PyExceptionClass_Check(t)); className = PyExceptionClass_Name(t); if (className != NULL) { - char *dot = strrchr(className, '.'); + const char *dot = strrchr(className, '.'); if (dot != NULL) className = dot+1; } diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 26f74c80d0..3d40c79bc1 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -774,12 +774,12 @@ print_exception(PyObject *f, PyObject *value) } 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; } -- cgit v1.2.1