mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +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
|
@ -884,7 +884,7 @@ _gethash(const char *s, int len, int scale)
|
|||
return h;
|
||||
}
|
||||
|
||||
static char *hangul_syllables[][3] = {
|
||||
static const char * const hangul_syllables[][3] = {
|
||||
{ "G", "A", "" },
|
||||
{ "GG", "AE", "G" },
|
||||
{ "N", "YA", "GG" },
|
||||
|
@ -1057,7 +1057,7 @@ find_syllable(const char *str, int *len, int *pos, int count, int column)
|
|||
int i, len1;
|
||||
*len = -1;
|
||||
for (i = 0; i < count; i++) {
|
||||
char *s = hangul_syllables[i][column];
|
||||
const char *s = hangul_syllables[i][column];
|
||||
len1 = Py_SAFE_DOWNCAST(strlen(s), size_t, int);
|
||||
if (len1 <= *len)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue