From 2f49aa8f62c5e1c99dabf453fc162129430ebd95 Mon Sep 17 00:00:00 2001 From: duerst Date: Mon, 6 Jun 2016 04:37:10 +0000 Subject: [PATCH] * string.c Change rb_str_casemap to use encoding primitive case_map instead of directly calling onigenc_unicode_case_map. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 13 +------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f97a009061..221befbb0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 6 13:37:08 2016 Martin Duerst + + * string.c Change rb_str_casemap to use encoding primitive + case_map instead of directly calling onigenc_unicode_case_map. + Mon Jun 6 13:16:46 2016 Martin Duerst * test/ruby/enc/test_case_mapping.rb: diff --git a/string.c b/string.c index bb9a7df807..8dd20be635 100644 --- a/string.c +++ b/string.c @@ -5753,17 +5753,6 @@ check_case_options(int argc, VALUE *argv, OnigCaseFoldType flags) return flags; } -/* The following declaration should be moved to an include file rather than - be duplicated here (and in enc/unicode.c), but we'll wait for this because - we want this to become a primitive anyway. */ -extern int -onigenc_unicode_case_map(OnigCaseFoldType* flag, - const OnigUChar** pp, - const OnigUChar* end, - OnigUChar* to, - OnigUChar* to_end, - const struct OnigEncodingTypeST* enc); - /* 16 should be long enough to absorb any kind of single character length increase */ #define CASE_MAPPING_ADDITIONAL_LENGTH 20 @@ -5800,7 +5789,7 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc) current_buffer = current_buffer->next; current_buffer->next = NULL; current_buffer->capa = capa; - buffer_length_or_invalid = onigenc_unicode_case_map(flags, + buffer_length_or_invalid = enc->case_map(flags, (const OnigUChar**)&source_current, source_end, current_buffer->space, current_buffer->space+current_buffer->capa,