mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345)
This commit is contained in:
parent
7ec43a7309
commit
cd8295ff75
27 changed files with 250 additions and 221 deletions
|
@ -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) == '}' || (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue