summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-01 00:34:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-01 00:34:41 +0000
commit4f7c3d3583f31f0754e69b94bf2eb55a65831582 (patch)
treef87db99a67b867219f0949cdabf827111019678d /enc
parent48beedd5db92b37ff6702e2e7a5e46e86be88a89 (diff)
downloadruby-4f7c3d3583f31f0754e69b94bf2eb55a65831582.tar.gz
constify CaseMappingSpecials
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-rw-r--r--enc/unicode.c2
-rw-r--r--enc/unicode/9.0.0/casefold.h2
-rwxr-xr-xenc/unicode/case-folding.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/enc/unicode.c b/enc/unicode.c
index cf77492781..f7627637d3 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -725,7 +725,7 @@ onigenc_unicode_case_map(OnigCaseFoldType* flagP,
MODIFIED;
if (flags&OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_SPECIALS) { /* special */
- OnigCodePoint *SpecialsStart = CaseMappingSpecials + OnigSpecialIndexDecode(folded->n);
+ const OnigCodePoint *SpecialsStart = CaseMappingSpecials + OnigSpecialIndexDecode(folded->n);
if (OnigCaseFoldFlags(folded->n)&ONIGENC_CASE_IS_TITLECASE) { /* swapCASE available */
if ((flags&(ONIGENC_CASE_UPCASE|ONIGENC_CASE_DOWNCASE))
diff --git a/enc/unicode/9.0.0/casefold.h b/enc/unicode/9.0.0/casefold.h
index f8f11673a7..5383d251aa 100644
--- a/enc/unicode/9.0.0/casefold.h
+++ b/enc/unicode/9.0.0/casefold.h
@@ -6931,7 +6931,7 @@ onigenc_unicode_CaseUnfold_13_lookup(const OnigCodePoint *codes)
return 0;
}
-OnigCodePoint CaseMappingSpecials[] = {
+static const OnigCodePoint CaseMappingSpecials[] = {
L(1)|0x039C,
L(2)|0x0053, 0x0073, L(2)|0x0053, 0x0053,
L(2)|0x02BC, 0x004E,
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
index e94b582a02..687887b9f9 100755
--- a/enc/unicode/case-folding.rb
+++ b/enc/unicode/case-folding.rb
@@ -326,7 +326,7 @@ class CaseMapping
end
def specials_output
- "OnigCodePoint CaseMappingSpecials[] = {\n" +
+ "static const OnigCodePoint CaseMappingSpecials[] = {\n" +
@specials.map do |sps|
' ' + sps.map do |sp|
chars = sp.split(/ /)