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) --- Modules/_elementtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/_elementtree.c') diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 49c372d86b0..c0c741e51c7 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -1132,7 +1132,7 @@ checkpath(PyObject* tag) if (PyUnicode_Check(tag)) { const Py_ssize_t len = PyUnicode_GET_LENGTH(tag); - void *data = PyUnicode_DATA(tag); + const void *data = PyUnicode_DATA(tag); unsigned int kind = PyUnicode_KIND(tag); if (len >= 3 && PyUnicode_READ(kind, data, 0) == '{' && ( PyUnicode_READ(kind, data, 1) == '}' || ( -- cgit v1.2.3