diff options
Diffstat (limited to 'enc/unicode/case-folding.rb')
-rwxr-xr-x | enc/unicode/case-folding.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb index 2b503ad65f..ef97baf737 100755 --- a/enc/unicode/case-folding.rb +++ b/enc/unicode/case-folding.rb @@ -155,8 +155,16 @@ class CaseFolding dest.print("/* DO NOT EDIT THIS FILE. */\n") dest.print("/* Generated by enc/unicode/case-folding.rb */\n\n") + versions = version.scan(/\d+/) + dest.print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n") + %w[MAJOR MINOR TEENY].zip(versions) do |n, v| + dest.print(" ONIG_UNICODE_VERSION_#{n} == #{v} && \\\n") + end + dest.print(" 1)\n") + dest.print("# error ONIG_UNICODE_VERSION_STRING mismatch\n") + dest.print("#endif\n") dest.print("#define ONIG_UNICODE_VERSION_STRING #{version.dump}\n") - %w[MAJOR MINOR TEENY].zip(version.scan(/\d+/)) do |n, v| + %w[MAJOR MINOR TEENY].zip(versions) do |n, v| dest.print("#define ONIG_UNICODE_VERSION_#{n} #{v}\n") end dest.print("\n") |