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

ruby-changes:7350

From: akr <ko1@a...>
Date: Tue, 26 Aug 2008 21:45:46 +0900 (JST)
Subject: [ruby-changes:7350] Ruby:r18869 (trunk): * transcode.c (rb_econv_binmode): binmode is effective only once.

akr	2008-08-26 21:45:20 +0900 (Tue, 26 Aug 2008)

  New Revision: 18869

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

  Log:
    * transcode.c (rb_econv_binmode): binmode is effective only once.

  Modified files:
    trunk/ChangeLog
    trunk/transcode.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18868)
+++ ChangeLog	(revision 18869)
@@ -1,3 +1,7 @@
+Tue Aug 26 21:44:39 2008  Tanaka Akira  <akr@f...>
+
+	* transcode.c (rb_econv_binmode): binmode is effective only once.
+
 Tue Aug 26 19:27:54 2008  Akinori MUSHA  <knu@i...>
 
 	* test/ruby/test_enum.rb (TestEnumerable#test_each_with_object):
Index: transcode.c
===================================================================
--- transcode.c	(revision 18868)
+++ transcode.c	(revision 18869)
@@ -1476,12 +1476,14 @@
         ec->elems[i].out_data_end = NULL;
         ec->elems[i].out_buf_end = NULL;
         ec->num_trans--;
+        ec->opts.flags &= ~ECONV_UNIVERSAL_NEWLINE_DECODER;
     }
     if (ec->opts.flags & (ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER)) {
         rb_transcoding_close(ec->elems[0].tc);
         xfree(ec->elems[0].out_buf_start);
         MEMMOVE(&ec->elems[0], &ec->elems[1], rb_econv_elem_t, ec->num_trans-1);
         ec->num_trans--;
+        ec->opts.flags &= ~(ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER);
     }
 }
 

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

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