[前][次][番号順一覧][スレッド一覧]

ruby-changes:43219

From: duerst <ko1@a...>
Date: Mon, 6 Jun 2016 13:37:16 +0900 (JST)
Subject: [ruby-changes:43219] duerst:r55293 (trunk): * string.c Change rb_str_casemap to use encoding primitive

duerst	2016-06-06 13:37:10 +0900 (Mon, 06 Jun 2016)

  New Revision: 55293

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55293

  Log:
    * string.c Change rb_str_casemap to use encoding primitive
      case_map instead of directly calling onigenc_unicode_case_map.

  Modified files:
    trunk/ChangeLog
    trunk/string.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55292)
+++ ChangeLog	(revision 55293)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun  6 13:37:08 2016  Martin Duerst  <duerst@i...>
+
+	* 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  <duerst@i...>
 
 	* test/ruby/enc/test_case_mapping.rb:
Index: string.c
===================================================================
--- string.c	(revision 55292)
+++ string.c	(revision 55293)
@@ -5753,17 +5753,6 @@ check_case_options(int argc, VALUE *argv https://github.com/ruby/ruby/blob/trunk/string.c#L5753
     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, OnigCaseFol https://github.com/ruby/ruby/blob/trunk/string.c#L5789
 	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,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]