summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-06 04:37:10 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-06 04:37:10 +0000
commit2f49aa8f62c5e1c99dabf453fc162129430ebd95 (patch)
tree51e5a961c7a529aa0c0f87442bacef77420ac911 /string.c
parentb09795d803b41b067c86a100072facb1ba98cfe3 (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.c13
1 files changed, 1 insertions, 12 deletions
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,