diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-06 04:37:10 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-06 04:37:10 +0000 |
commit | 2f49aa8f62c5e1c99dabf453fc162129430ebd95 (patch) | |
tree | 51e5a961c7a529aa0c0f87442bacef77420ac911 /string.c | |
parent | b09795d803b41b067c86a100072facb1ba98cfe3 (diff) |
* 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
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -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, |