mirror of
https://github.com/python/cpython.git
synced 2025-09-03 23:41:18 +00:00
Issue #25923: Added the const qualifier to static constant arrays.
This commit is contained in:
parent
ea8c43152f
commit
2d06e84455
44 changed files with 139 additions and 134 deletions
|
@ -870,7 +870,7 @@ get_operator(const node *n)
|
|||
}
|
||||
}
|
||||
|
||||
static const char* FORBIDDEN[] = {
|
||||
static const char * const FORBIDDEN[] = {
|
||||
"None",
|
||||
"True",
|
||||
"False",
|
||||
|
@ -887,7 +887,7 @@ forbidden_name(struct compiling *c, identifier name, const node *n,
|
|||
return 1;
|
||||
}
|
||||
if (full_checks) {
|
||||
const char **p;
|
||||
const char * const *p;
|
||||
for (p = FORBIDDEN; *p; p++) {
|
||||
if (PyUnicode_CompareWithASCIIString(name, *p) == 0) {
|
||||
ast_error(c, n, "assignment to keyword");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue