From cd8295ff758891f21084a6a5ad3403d35dda38f7 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 11 Apr 2020 10:48:40 +0300 Subject: bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345) --- Python/traceback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/traceback.c') diff --git a/Python/traceback.c b/Python/traceback.c index f88ba1d0ad..2167e07a9b 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -376,7 +376,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) int fd; int i; char *found_encoding; - char *encoding; + const char *encoding; PyObject *io; PyObject *binary; PyObject *fob = NULL; @@ -384,7 +384,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) PyObject *res; char buf[MAXPATHLEN+1]; int kind; - void *data; + const void *data; /* open the file */ if (filename == NULL) -- cgit v1.2.1