mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)
This commit is contained in:
parent
3e0dd3730b
commit
8f87eefe7f
20 changed files with 38 additions and 37 deletions
|
|
@ -1153,7 +1153,7 @@ checkpath(PyObject* tag)
|
|||
return 0;
|
||||
}
|
||||
if (PyBytes_Check(tag)) {
|
||||
char *p = PyBytes_AS_STRING(tag);
|
||||
const char *p = PyBytes_AS_STRING(tag);
|
||||
const Py_ssize_t len = PyBytes_GET_SIZE(tag);
|
||||
if (len >= 3 && p[0] == '{' && (
|
||||
p[1] == '}' || (p[1] == '*' && p[2] == '}'))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue