summaryrefslogtreecommitdiff
path: root/Modules/unicodedata.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-25 19:53:18 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-25 19:53:18 +0200
commitd1ba93f9a6a441ac31c5fd1890ce730b9e6d330d (patch)
tree8b977eca9b539fb4d1064d92cc2a405fab36e75d /Modules/unicodedata.c
parent5f0e32baa674d4563910e0b58f1563ab0b2aa52a (diff)
downloadcpython-d1ba93f9a6a441ac31c5fd1890ce730b9e6d330d.tar.gz
Issue #25923: Added the const qualifier to static constant arrays.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r--Modules/unicodedata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index fe4e90822a..7d518fa257 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;