diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-25 19:53:18 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-25 19:53:18 +0200 |
commit | 2d06e8445587d9b4d0bf79bdb08ab4743b780249 (patch) | |
tree | 9708850d5ae4855466435687cf36f162834d2694 /Modules/unicodedata.c | |
parent | Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser. (diff) | |
download | cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.gz cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.bz2 cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.zip |
Issue #25923: Added the const qualifier to static constant arrays.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index fe4e90822a3..7d518fa2573 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -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; |