Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index f442418..32f8a89 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -367,7 +367,7 @@
 {
     PyObject *unicode;
     PyObject *bytes = NULL;
-    char *str;
+    const char *str;
     Py_ssize_t n;
     int err;
 
@@ -389,10 +389,8 @@
         bytes = _PyUnicode_AsUTF8String(unicode, "backslashreplace");
         if (bytes == NULL)
             return NULL;
-        if (PyBytes_AsStringAndSize(bytes, &str, &n) < 0) {
-            Py_DECREF(bytes);
-            return NULL;
-        }
+        str = PyBytes_AS_STRING(bytes);
+        n = PyBytes_GET_SIZE(bytes);
     }
 
     n = _Py_write(self->fd, str, n);
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 80bf71e..17a55dd 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1225,7 +1225,7 @@
     PyObject *result;
     double x;
     long exp, top_exp, lsb, key_digit;
-    char *s, *coeff_start, *s_store, *coeff_end, *exp_start, *s_end;
+    const char *s, *coeff_start, *s_store, *coeff_end, *exp_start, *s_end;
     int half_eps, digit, round_up, negate=0;
     Py_ssize_t length, ndigits, fdigits, i;
 
@@ -1288,7 +1288,7 @@
         s++;
 
     /* infinities and nans */
-    x = _Py_parse_inf_or_nan(s, &coeff_end);
+    x = _Py_parse_inf_or_nan(s, (char **)&coeff_end);
     if (coeff_end != s) {
         s = coeff_end;
         goto finished;
@@ -1619,7 +1619,7 @@
 static PyObject *
 float_getformat(PyTypeObject *v, PyObject* arg)
 {
-    char* s;
+    const char *s;
     float_format_type r;
 
     if (!PyUnicode_Check(arg)) {
diff --git a/Objects/longobject.c b/Objects/longobject.c
index b0f6b8c..822ed16 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -2491,7 +2491,8 @@
 PyLong_FromUnicodeObject(PyObject *u, int base)
 {
     PyObject *result, *asciidig;
-    char *buffer, *end = NULL;
+    const char *buffer;
+    char *end = NULL;
     Py_ssize_t buflen;
 
     asciidig = _PyUnicode_TransformDecimalAndSpaceToASCII(u);
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index 79be51a..701bcb1 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -231,7 +231,7 @@
     PyObject *nameobj;
     PyObject *m = NULL;
     int has_execution_slots = 0;
-    char *name;
+    const char *name;
     int ret;
 
     PyModuleDef_Init(def);
@@ -512,7 +512,7 @@
 PyModule_GetFilename(PyObject *m)
 {
     PyObject *fileobj;
-    char *utf8;
+    const char *utf8;
     fileobj = PyModule_GetFilenameObject(m);
     if (fileobj == NULL)
         return NULL;
diff --git a/Objects/setobject.c b/Objects/setobject.c
index fdb9d36..b7e0617 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2398,7 +2398,7 @@
 test_c_api(PySetObject *so)
 {
     Py_ssize_t count;
-    char *s;
+    const char *s;
     Py_ssize_t i;
     PyObject *elem=NULL, *dup=NULL, *t, *f, *dup2, *x=NULL;
     PyObject *ob = (PyObject *)so;
diff --git a/Objects/structseq.c b/Objects/structseq.c
index 5489aef..6f1782f 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -182,7 +182,7 @@
 
     for (i=0; i < VISIBLE_SIZE(obj); i++) {
         PyObject *val, *repr;
-        char *cname, *crepr;
+        const char *cname, *crepr;
 
         cname = typ->tp_members[i].name;
         if (cname == NULL) {
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 606e08e..af09271 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1624,7 +1624,7 @@
     i = 0;
     while (PyDict_Next(set, &i, &k, &v) && (size_t)off < sizeof(buf)) {
         PyObject *name = class_name(k);
-        char *name_str;
+        const char *name_str;
         if (name != NULL) {
             name_str = PyUnicode_AsUTF8(name);
             if (name_str == NULL)
@@ -2572,7 +2572,7 @@
         PyObject *doc = _PyDict_GetItemId(dict, &PyId___doc__);
         if (doc != NULL && PyUnicode_Check(doc)) {
             Py_ssize_t len;
-            char *doc_str;
+            const char *doc_str;
             char *tp_doc;
 
             doc_str = PyUnicode_AsUTF8(doc);