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

ruby-changes:22495

From: naruse <ko1@a...>
Date: Sat, 11 Feb 2012 03:37:57 +0900 (JST)
Subject: [ruby-changes:22495] naruse:r34544 (ruby_1_9_3): merge revision(s) 33946:

naruse	2012-02-11 03:37:45 +0900 (Sat, 11 Feb 2012)

  New Revision: 34544

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

  Log:
    merge revision(s) 33946:
    
    * ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
      1st, to change the mode of an IO is very sensitive problem, so
      the maintainer of this library should judge it.
      2nd, usually Zlib::GzReader.new is not called directly.  #initialize
      is called via .open, and in the method the I/O is opened in binary
      mode, so there is no problem without changing the mode in #initialize.

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/ext/zlib/zlib.c
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 34543)
+++ ruby_1_9_3/ChangeLog	(revision 34544)
@@ -1,3 +1,12 @@
+Sat Feb 11 03:37:34 2012  NAKAMURA Usaku  <usa@r...>
+
+	* ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
+	  1st, to change the mode of an IO is very sensitive problem, so
+	  the maintainer of this library should judge it.
+	  2nd, usually Zlib::GzReader.new is not called directly.  #initialize
+	  is called via .open, and in the method the I/O is opened in binary
+	  mode, so there is no problem without changing the mode in #initialize.
+
 Sat Feb 11 03:23:58 2012  Luis Lavena  <luislavena@g...>
 
 	* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
Index: ruby_1_9_3/ext/zlib/zlib.c
===================================================================
--- ruby_1_9_3/ext/zlib/zlib.c	(revision 34543)
+++ ruby_1_9_3/ext/zlib/zlib.c	(revision 34544)
@@ -10,7 +10,6 @@
 #include <zlib.h>
 #include <time.h>
 #include <ruby/io.h>
-#include <fcntl.h>
 
 #ifdef HAVE_VALGRIND_MEMCHECK_H
 # include <valgrind/memcheck.h>
@@ -3413,13 +3412,6 @@
 
     Data_Get_Struct(obj, struct gzfile, gz);
     rb_scan_args(argc, argv, "1:", &io, &opt);
-#ifdef O_BINARY
-    if (BUILTIN_TYPE(io) == T_FILE) {
-        rb_io_t *fptr;
-        GetOpenFile(io, fptr);
-        setmode(fptr->fd, O_BINARY);
-    }
-#endif
 
     /* this is undocumented feature of zlib */
     err = inflateInit2(&gz->z.stream, -MAX_WBITS);
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 34543)
+++ ruby_1_9_3/version.h	(revision 34544)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 89
+#define RUBY_PATCHLEVEL 90
 
 #define RUBY_RELEASE_DATE "2012-02-11"
 #define RUBY_RELEASE_YEAR 2012

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

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