Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index c881f90..b862e2b 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -154,7 +154,7 @@
PyObject *m, *d, *v, *w, *oenc = NULL, *mod_name;
mod_ty mod;
PyArena *arena;
- char *ps1 = "", *ps2 = "", *enc = NULL;
+ const char *ps1 = "", *ps2 = "", *enc = NULL;
int errcode = 0;
_Py_IDENTIFIER(encoding);
_Py_IDENTIFIER(__main__);
@@ -511,8 +511,8 @@
static void
print_error_text(PyObject *f, int offset, PyObject *text_obj)
{
- char *text;
- char *nl;
+ const char *text;
+ const char *nl;
text = PyUnicode_AsUTF8(text_obj);
if (text == NULL)