Issue #1772673: The type of `char*` arguments now changed to `const char*`.
diff --git a/Python/ast.c b/Python/ast.c
index 9ffe3c7..3bd24fd 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3651,18 +3651,16 @@
     end = s + strlen(s) - 1;
     imflag = *end == 'j' || *end == 'J';
     if (s[0] == '0') {
-        x = (long) PyOS_strtoul((char *)s, (char **)&end, 0);
+        x = (long) PyOS_strtoul(s, (char **)&end, 0);
         if (x < 0 && errno == 0) {
-            return PyLong_FromString((char *)s,
-                                     (char **)0,
-                                     0);
+            return PyLong_FromString(s, (char **)0, 0);
         }
     }
     else
-        x = PyOS_strtol((char *)s, (char **)&end, 0);
+        x = PyOS_strtol(s, (char **)&end, 0);
     if (*end == '\0') {
         if (errno != 0)
-            return PyLong_FromString((char *)s, (char **)0, 0);
+            return PyLong_FromString(s, (char **)0, 0);
         return PyLong_FromLong(x);
     }
     /* XXX Huge floats may silently fail */
@@ -3685,8 +3683,8 @@
 static PyObject *
 decode_utf8(struct compiling *c, const char **sPtr, const char *end)
 {
-    char *s, *t;
-    t = s = (char *)*sPtr;
+    const char *s, *t;
+    t = s = *sPtr;
     /* while (s < end && *s != '\\') s++; */ /* inefficient for u".." */
     while (s < end && (*s & 0x80)) s++;
     *sPtr = s;
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 3f270b4..4713874 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1335,7 +1335,7 @@
 
     if (positional)
         v = args;
-    else if (!PyArg_UnpackTuple(args, (char *)name, 1, 1, &v))
+    else if (!PyArg_UnpackTuple(args, name, 1, 1, &v))
         return NULL;
 
     emptytuple = PyTuple_New(0);
diff --git a/Python/codecs.c b/Python/codecs.c
index cb9f0d8..c541ba0 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -441,7 +441,7 @@
         return -1;
     }
     return PyDict_SetItemString(interp->codec_error_registry,
-                                (char *)name, error);
+                                name, error);
 }
 
 /* Lookup the error handling callback function registered under the
@@ -457,7 +457,7 @@
 
     if (name==NULL)
         name = "strict";
-    handler = PyDict_GetItemString(interp->codec_error_registry, (char *)name);
+    handler = PyDict_GetItemString(interp->codec_error_registry, name);
     if (!handler)
         PyErr_Format(PyExc_LookupError, "unknown error handler name '%.400s'", name);
     else
diff --git a/Python/import.c b/Python/import.c
index 1a162ee..c96106f 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -517,7 +517,7 @@
 }
 
 int
-_PyImport_FixupBuiltin(PyObject *mod, char *name)
+_PyImport_FixupBuiltin(PyObject *mod, const char *name)
 {
     int res;
     PyObject *nameobj;
@@ -656,22 +656,23 @@
  * interface.  The other two exist primarily for backward compatibility.
  */
 PyObject *
-PyImport_ExecCodeModule(char *name, PyObject *co)
+PyImport_ExecCodeModule(const char *name, PyObject *co)
 {
     return PyImport_ExecCodeModuleWithPathnames(
         name, co, (char *)NULL, (char *)NULL);
 }
 
 PyObject *
-PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname)
+PyImport_ExecCodeModuleEx(const char *name, PyObject *co, const char *pathname)
 {
     return PyImport_ExecCodeModuleWithPathnames(
         name, co, pathname, (char *)NULL);
 }
 
 PyObject *
-PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname,
-                                     char *cpathname)
+PyImport_ExecCodeModuleWithPathnames(const char *name, PyObject *co,
+                                     const char *pathname,
+                                     const char *cpathname)
 {
     PyObject *m = NULL;
     PyObject *nameobj, *pathobj = NULL, *cpathobj = NULL;
@@ -1019,7 +1020,7 @@
     size = p->size;
     if (size < 0)
         size = -size;
-    return PyMarshal_ReadObjectFromString((char *)p->code, size);
+    return PyMarshal_ReadObjectFromString((const char *)p->code, size);
 }
 
 static PyObject *
@@ -1071,7 +1072,7 @@
     ispackage = (size < 0);
     if (ispackage)
         size = -size;
-    co = PyMarshal_ReadObjectFromString((char *)p->code, size);
+    co = PyMarshal_ReadObjectFromString((const char *)p->code, size);
     if (co == NULL)
         return -1;
     if (!PyCode_Check(co)) {
@@ -1113,7 +1114,7 @@
 }
 
 int
-PyImport_ImportFrozenModule(char *name)
+PyImport_ImportFrozenModule(const char *name)
 {
     PyObject *nameobj;
     int ret;
diff --git a/Python/marshal.c b/Python/marshal.c
index f94276a..4401afb 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1466,15 +1466,15 @@
 }
 
 PyObject *
-PyMarshal_ReadObjectFromString(char *str, Py_ssize_t len)
+PyMarshal_ReadObjectFromString(const char *str, Py_ssize_t len)
 {
     RFILE rf;
     PyObject *result;
     rf.fp = NULL;
     rf.readable = NULL;
     rf.current_filename = NULL;
-    rf.ptr = str;
-    rf.end = str + len;
+    rf.ptr = (char *)str;
+    rf.end = (char *)str + len;
     rf.buf = NULL;
     rf.depth = 0;
     rf.refs = PyList_New(0);
diff --git a/Python/mystrtoul.c b/Python/mystrtoul.c
index 725f07c..98429d4 100644
--- a/Python/mystrtoul.c
+++ b/Python/mystrtoul.c
@@ -92,7 +92,7 @@
 **              exceptions - we don't check for them.
 */
 unsigned long
-PyOS_strtoul(char *str, char **ptr, int base)
+PyOS_strtoul(const char *str, char **ptr, int base)
 {
     unsigned long result = 0; /* return value of the function */
     int c;             /* current input character */
@@ -111,7 +111,7 @@
                 /* there must be at least one digit after 0x */
                 if (_PyLong_DigitValue[Py_CHARMASK(str[1])] >= 16) {
                     if (ptr)
-                        *ptr = str;
+                        *ptr = (char *)str;
                     return 0;
                 }
                 ++str;
@@ -120,7 +120,7 @@
                 /* there must be at least one digit after 0o */
                 if (_PyLong_DigitValue[Py_CHARMASK(str[1])] >= 8) {
                     if (ptr)
-                        *ptr = str;
+                        *ptr = (char *)str;
                     return 0;
                 }
                 ++str;
@@ -129,7 +129,7 @@
                 /* there must be at least one digit after 0b */
                 if (_PyLong_DigitValue[Py_CHARMASK(str[1])] >= 2) {
                     if (ptr)
-                        *ptr = str;
+                        *ptr = (char *)str;
                     return 0;
                 }
                 ++str;
@@ -141,7 +141,7 @@
                 while (Py_ISSPACE(Py_CHARMASK(*str)))
                     ++str;
                 if (ptr)
-                    *ptr = str;
+                    *ptr = (char *)str;
                 return 0;
             }
         }
@@ -157,7 +157,7 @@
                 /* there must be at least one digit after 0x */
                 if (_PyLong_DigitValue[Py_CHARMASK(str[1])] >= 16) {
                     if (ptr)
-                        *ptr = str;
+                        *ptr = (char *)str;
                     return 0;
                 }
                 ++str;
@@ -171,7 +171,7 @@
                 /* there must be at least one digit after 0o */
                 if (_PyLong_DigitValue[Py_CHARMASK(str[1])] >= 8) {
                     if (ptr)
-                        *ptr = str;
+                        *ptr = (char *)str;
                     return 0;
                 }
                 ++str;
@@ -185,7 +185,7 @@
                 /* there must be at least one digit after 0b */
                 if (_PyLong_DigitValue[Py_CHARMASK(str[1])] >= 2) {
                     if (ptr)
-                        *ptr = str;
+                        *ptr = (char *)str;
                     return 0;
                 }
                 ++str;
@@ -197,7 +197,7 @@
     /* catch silly bases */
     if (base < 2 || base > 36) {
         if (ptr)
-            *ptr = str;
+            *ptr = (char *)str;
         return 0;
     }
 
@@ -239,7 +239,7 @@
 
     /* set pointer to point to the last character scanned */
     if (ptr)
-        *ptr = str;
+        *ptr = (char *)str;
 
     return result;
 
@@ -248,7 +248,7 @@
         /* spool through remaining digit characters */
         while (_PyLong_DigitValue[Py_CHARMASK(*str)] < base)
             ++str;
-        *ptr = str;
+        *ptr = (char *)str;
     }
     errno = ERANGE;
     return (unsigned long)-1;
@@ -260,7 +260,7 @@
 #define PY_ABS_LONG_MIN         (0-(unsigned long)LONG_MIN)
 
 long
-PyOS_strtol(char *str, char **ptr, int base)
+PyOS_strtol(const char *str, char **ptr, int base)
 {
     long result;
     unsigned long uresult;