bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345)

diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 2baec5e..dad177a 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1428,7 +1428,7 @@
 {
     Py_ssize_t i, size, offset;
     int kind;
-    void *data;
+    const void *data;
 
     if (PyUnicode_READY(name))
         return NULL;
@@ -2953,7 +2953,7 @@
     static PyObject *exec_prefix = NULL;
     Py_ssize_t text_len = PyUnicode_GET_LENGTH(self->text), match;
     int kind = PyUnicode_KIND(self->text);
-    void *data = PyUnicode_DATA(self->text);
+    const void *data = PyUnicode_DATA(self->text);
 
     /* Ignore leading whitespace */
     while (start < text_len) {