utf8proc

A clean C library for processing UTF-8 Unicode data
git clone https://git.sinitax.com/juliastrings/utf8proc
Log | Files | Refs | README | LICENSE | sfeed.txt

commit 95fc75b83956760a11992a87aab9c487fcbee12a
parent 91b91fe0334bef219ed7aa66b70377717d273b99
Author: Paul Smith <paul@mad-scientist.net>
Date:   Sun, 19 Feb 2017 17:33:25 -0500

Ensure generated const data tables are hidden via "static" (#100)


Diffstat:
Mdata/data_generator.rb | 10+++++-----
Mutf8proc_data.c | 10+++++-----
2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/data/data_generator.rb b/data/data_generator.rb @@ -340,7 +340,7 @@ for code in 0...0x110000 end end -$stdout << "const utf8proc_uint16_t utf8proc_sequences[] = {\n " +$stdout << "static const utf8proc_uint16_t utf8proc_sequences[] = {\n " i = 0 $int_array.each do |entry| i += 1 @@ -352,7 +352,7 @@ $int_array.each do |entry| end $stdout << "};\n\n" -$stdout << "const utf8proc_uint16_t utf8proc_stage1table[] = {\n " +$stdout << "static const utf8proc_uint16_t utf8proc_stage1table[] = {\n " i = 0 stage1.each do |entry| i += 1 @@ -364,7 +364,7 @@ stage1.each do |entry| end $stdout << "};\n\n" -$stdout << "const utf8proc_uint16_t utf8proc_stage2table[] = {\n " +$stdout << "static const utf8proc_uint16_t utf8proc_stage2table[] = {\n " i = 0 stage2.flatten.each do |entry| i += 1 @@ -376,7 +376,7 @@ stage2.flatten.each do |entry| end $stdout << "};\n\n" -$stdout << "const utf8proc_property_t utf8proc_properties[] = {\n" +$stdout << "static const utf8proc_property_t utf8proc_properties[] = {\n" $stdout << " {0, 0, 0, 0, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, false,false,false,false, 0, 0, UTF8PROC_BOUNDCLASS_OTHER},\n" properties.each { |line| $stdout << line @@ -385,7 +385,7 @@ $stdout << "};\n\n" -$stdout << "const utf8proc_uint16_t utf8proc_combinations[] = {\n " +$stdout << "static const utf8proc_uint16_t utf8proc_combinations[] = {\n " i = 0 comb1st_indicies.keys.each_index do |a| offset = 0 diff --git a/utf8proc_data.c b/utf8proc_data.c @@ -1,4 +1,4 @@ -const utf8proc_uint16_t utf8proc_sequences[] = { +static const utf8proc_uint16_t utf8proc_sequences[] = { 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, @@ -1176,7 +1176,7 @@ const utf8proc_uint16_t utf8proc_sequences[] = { 56603, 55354, 56604, 55354, 56605, 55354, 56606, 55354, 56607, 55354, 56608, 55354, 56609, }; -const utf8proc_uint16_t utf8proc_stage1table[] = { +static const utf8proc_uint16_t utf8proc_stage1table[] = { 0, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632, @@ -1723,7 +1723,7 @@ const utf8proc_uint16_t utf8proc_stage1table[] = { 18432, 18432, 18432, 18432, 18432, 18432, 18432, 18432, 38656, }; -const utf8proc_uint16_t utf8proc_stage2table[] = { +static const utf8proc_uint16_t utf8proc_stage2table[] = { 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 3, 5, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -6590,7 +6590,7 @@ const utf8proc_uint16_t utf8proc_stage2table[] = { 3984, 3984, 3984, 3984, 3984, 3984, 3984, 0, 0, }; -const utf8proc_property_t utf8proc_properties[] = { +static const utf8proc_property_t utf8proc_properties[] = { {0, 0, 0, 0, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, false,false,false,false, 0, 0, UTF8PROC_BOUNDCLASS_OTHER}, {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_BN, 0, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, false, true, false, true, 0, 0, UTF8PROC_BOUNDCLASS_CONTROL}, {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_BN, 0, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, false, false, false, true, 0, 0, UTF8PROC_BOUNDCLASS_CONTROL}, @@ -13420,7 +13420,7 @@ const utf8proc_property_t utf8proc_properties[] = { {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, 7975, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT16_MAX, false, false, false, false, 2, 0, UTF8PROC_BOUNDCLASS_OTHER}, }; -const utf8proc_uint16_t utf8proc_combinations[] = { +static const utf8proc_uint16_t utf8proc_combinations[] = { 0, 46, 192, 193, 194, 195, 196, 197, 0, 256, 258, 260, 550, 461, 0, 0, 512, 514, 0, 0, 0, 0, 0, 0, 0,