From 5d858465b6ebdafa05f86309457848cc26913b6a Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 20 Nov 2016 10:16:47 +0200 Subject: Added the const qualifier to char* variables that refer to readonly internal UTF-8 represenatation of Unicode objects. --- Python/pythonrun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index c881f901ab..b862e2b361 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -154,7 +154,7 @@ PyRun_InteractiveOneObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags) 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 @@ PyErr_Print(void) 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) -- cgit v1.2.1