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

ruby-changes:44257

From: nobu <ko1@a...>
Date: Mon, 3 Oct 2016 21:39:15 +0900 (JST)
Subject: [ruby-changes:44257] nobu:r56330 (trunk): use rb_locale_str_new

nobu	2016-10-03 21:39:10 +0900 (Mon, 03 Oct 2016)

  New Revision: 56330

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

  Log:
    use rb_locale_str_new
    
    * ext/readline/readline.c (readline_char_is_quoted): use
      rb_locale_str_new with the length.  [Feature #12659]

  Modified files:
    trunk/ext/readline/readline.c
Index: ext/readline/readline.c
===================================================================
--- ext/readline/readline.c	(revision 56329)
+++ ext/readline/readline.c	(revision 56330)
@@ -1080,7 +1080,7 @@ readline_char_is_quoted(char *text, int https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c#L1080
                  byte_index, len);
     }
 
-    str = rb_locale_str_new_cstr(text);
+    str = rb_locale_str_new(text, len);
     char_index = rb_str_sublen(str, byte_index);
     result = rb_funcall(proc, id_call, 2, str, LONG2FIX(char_index));
     return RTEST(result);

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

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