[3.8] closes bpo-39630: Update pointers to string literals to be const char *. (GH-18511)

(cherry picked from commit 7386a70746cf9aaf2d95db75d9201fb124f085df)

Co-authored-by: Andy Lester <andy@petdance.com>
diff --git a/Python/codecs.c b/Python/codecs.c
index d4b34f8..4bd28ec 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -1415,7 +1415,7 @@
 static int _PyCodecRegistry_Init(void)
 {
     static struct {
-        char *name;
+        const char *name;
         PyMethodDef def;
     } methods[] =
     {
diff --git a/Python/errors.c b/Python/errors.c
index 197d977..1360c0d 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -584,7 +584,7 @@
 
 #ifndef MS_WINDOWS
     if (i != 0) {
-        char *s = strerror(i);
+        const char *s = strerror(i);
         message = PyUnicode_DecodeLocale(s, "surrogateescape");
     }
     else {