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

ruby-changes:9125

From: kouji <ko1@a...>
Date: Fri, 12 Dec 2008 19:05:03 +0900 (JST)
Subject: [ruby-changes:9125] Ruby:r20662 (trunk): * ext/readline/readline.c: used the ExportStringValue macro

kouji	2008-12-12 19:04:42 +0900 (Fri, 12 Dec 2008)

  New Revision: 20662

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20662

  Log:
    * ext/readline/readline.c: used the ExportStringValue macro
      instead of the OutputStringValue macro. removed the
      OutputStringValue macro.

  Modified files:
    trunk/ChangeLog
    trunk/ext/readline/readline.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20661)
+++ ChangeLog	(revision 20662)
@@ -1,3 +1,9 @@
+Fri Dec 12 19:00:49 2008  TAKAO Kouji  <kouji@t...>
+
+	* ext/readline/readline.c: used the ExportStringValue macro
+	  instead of the OutputStringValue macro. removed the
+	  OutputStringValue macro.
+
 Fri Dec 12 16:23:18 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (yycompile0): ruby_eval_tree_begin is always 0 when
Index: ext/readline/readline.c
===================================================================
--- ext/readline/readline.c	(revision 20661)
+++ ext/readline/readline.c	(revision 20662)
@@ -63,11 +63,6 @@
 static char **readline_attempted_completion_function(const char *text,
                                                      int start, int end);
 
-#define OutputStringValue(str) do {\
-    SafeStringValue(str);\
-    str = rb_str_conv_enc(str, rb_enc_get(str), rb_locale_encoding());\
-} while (0)\
-
 #ifdef HAVE_RL_EVENT_HOOK
 #define BUSY_WAIT 0
 
@@ -219,7 +214,7 @@
 
     rb_secure(4);
     if (rb_scan_args(argc, argv, "02", &tmp, &add_hist) > 0) {
-	OutputStringValue(tmp);
+	ExportStringValue(tmp);
 	prompt = RSTRING_PTR(tmp);
     }
 
@@ -573,7 +568,7 @@
 	rl_completion_append_character = '\0';
     }
     else {
-	OutputStringValue(str);
+	ExportStringValue(str);
 	if (RSTRING_LEN(str) == 0) {
 	    rl_completion_append_character = '\0';
 	} else {
@@ -636,7 +631,7 @@
     static char *basic_word_break_characters = NULL;
 
     rb_secure(4);
-    OutputStringValue(str);
+    ExportStringValue(str);
     if (basic_word_break_characters == NULL) {
 	basic_word_break_characters =
 	    ALLOC_N(char, RSTRING_LEN(str) + 1);
@@ -699,7 +694,7 @@
     static char *completer_word_break_characters = NULL;
 
     rb_secure(4);
-    OutputStringValue(str);
+    ExportStringValue(str);
     if (completer_word_break_characters == NULL) {
 	completer_word_break_characters =
 	    ALLOC_N(char, RSTRING_LEN(str) + 1);
@@ -760,7 +755,7 @@
     static char *basic_quote_characters = NULL;
 
     rb_secure(4);
-    OutputStringValue(str);
+    ExportStringValue(str);
     if (basic_quote_characters == NULL) {
 	basic_quote_characters =
 	    ALLOC_N(char, RSTRING_LEN(str) + 1);
@@ -824,7 +819,7 @@
     static char *completer_quote_characters = NULL;
 
     rb_secure(4);
-    OutputStringValue(str);
+    ExportStringValue(str);
     if (completer_quote_characters == NULL) {
 	completer_quote_characters =
 	    ALLOC_N(char, RSTRING_LEN(str) + 1);
@@ -886,7 +881,7 @@
     static char *filename_quote_characters = NULL;
 
     rb_secure(4);
-    OutputStringValue(str);
+    ExportStringValue(str);
     if (filename_quote_characters == NULL) {
 	filename_quote_characters =
 	    ALLOC_N(char, RSTRING_LEN(str) + 1);
@@ -977,7 +972,7 @@
 
     rb_secure(4);
     i = NUM2INT(index);
-    OutputStringValue(str);
+    ExportStringValue(str);
     if (i < 0) {
         i += history_length;
     }
@@ -998,7 +993,7 @@
 hist_push(VALUE self, VALUE str)
 {
     rb_secure(4);
-    OutputStringValue(str);
+    ExportStringValue(str);
     add_history(RSTRING_PTR(str));
     return self;
 }
@@ -1011,7 +1006,7 @@
     rb_secure(4);
     while (argc--) {
 	str = *argv++;
-	OutputStringValue(str);
+	ExportStringValue(str);
 	add_history(RSTRING_PTR(str));
     }
     return self;

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

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