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

ruby-changes:7791

From: akr <ko1@a...>
Date: Sat, 13 Sep 2008 02:53:49 +0900 (JST)
Subject: [ruby-changes:7791] Ruby:r19312 (trunk): * transcode.c (rb_econv_prepare_opts): initialize *opt and return 0

akr	2008-09-13 02:53:26 +0900 (Sat, 13 Sep 2008)

  New Revision: 19312

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

  Log:
    * transcode.c (rb_econv_prepare_opts): initialize *opt and return 0
      if opthash is nil.

  Modified files:
    trunk/ChangeLog
    trunk/transcode.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19311)
+++ ChangeLog	(revision 19312)
@@ -1,3 +1,8 @@
+Sat Sep 13 02:50:34 2008  Tanaka Akira  <akr@f...>
+
+	* transcode.c (rb_econv_prepare_opts): initialize *opt and return 0
+	  if opthash is nil. 
+
 Sat Sep 13 02:29:19 2008  Tanaka Akira  <akr@f...>
 
 	* enc/trans/escape.trans: transcoder name renamed to use underscore.
Index: transcode.c
===================================================================
--- transcode.c	(revision 19311)
+++ transcode.c	(revision 19312)
@@ -2304,8 +2304,10 @@
 {
     int ecflags;
     VALUE newhash = Qnil;
-    if (NIL_P(opthash))
-        return Qnil;
+    if (NIL_P(opthash)) {
+        *opts = Qnil;
+        return 0;
+    }
     ecflags = econv_opts(opthash);
 
     if ((ecflags & ECONV_INVALID_MASK) == ECONV_INVALID_REPLACE ||

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

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