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

ruby-changes:7290

From: akr <ko1@a...>
Date: Sun, 24 Aug 2008 15:44:44 +0900 (JST)
Subject: [ruby-changes:7290] Ruby:r18809 (trunk): * transcode.c (rb_econv_substr_append): associate dst with destination

akr	2008-08-24 15:44:21 +0900 (Sun, 24 Aug 2008)

  New Revision: 18809

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

  Log:
    * transcode.c (rb_econv_substr_append): associate dst with destination
      encoding when dst is created.

  Modified files:
    trunk/ChangeLog
    trunk/transcode.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18808)
+++ ChangeLog	(revision 18809)
@@ -1,3 +1,8 @@
+Sun Aug 24 15:43:41 2008  Tanaka Akira  <akr@f...>
+
+	* transcode.c (rb_econv_substr_append): associate dst with destination
+	  encoding when dst is created.
+
 Sun Aug 24 15:21:28 2008  Tanaka Akira  <akr@f...>
 
 	* include/ruby/encoding.h (rb_str_transcode): add ecflags argument.
Index: transcode.c
===================================================================
--- transcode.c	(revision 18808)
+++ transcode.c	(revision 18809)
@@ -1334,8 +1334,11 @@
     rb_econv_result_t res;
     int max_output;
 
-    if (NIL_P(dst))
+    if (NIL_P(dst)) {
         dst = rb_str_buf_new(len);
+        if (ec->destination_encoding)
+            rb_enc_associate(dst, ec->destination_encoding);
+    }
 
     if (ec->last_tc)
         max_output = ec->last_tc->transcoder->max_output;

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

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