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

ruby-changes:38993

From: nobu <ko1@a...>
Date: Tue, 30 Jun 2015 23:12:22 +0900 (JST)
Subject: [ruby-changes:38993] nobu:r51074 (trunk): io.c: remove unnecessary shared

nobu	2015-06-30 23:12:16 +0900 (Tue, 30 Jun 2015)

  New Revision: 51074

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

  Log:
    io.c: remove unnecessary shared
    
    * io.c (rb_io_reopen): FilePathValue() ensures the path
      NUL-terminated and frozen, so it is unnecessary to make it shared.

  Modified files:
    trunk/ChangeLog
    trunk/io.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51073)
+++ ChangeLog	(revision 51074)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jun 30 23:12:08 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (rb_io_reopen): FilePathValue() ensures the path
+	  NUL-terminated and frozen, so it is unnecessary to make it shared.
+
 Tue Jun 30 23:11:53 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* dir.c (check_dirname): ensure path name NUL-terminated for
Index: io.c
===================================================================
--- io.c	(revision 51073)
+++ io.c	(revision 51074)
@@ -6778,7 +6778,7 @@ rb_io_reopen(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/io.c#L6778
 	oflags = rb_io_fmode_oflags(fptr->mode);
     }
 
-    fptr->pathv = rb_str_new_frozen(fname);
+    fptr->pathv = fname;
     if (fptr->fd < 0) {
         fptr->fd = rb_sysopen(fptr->pathv, oflags, 0666);
 	fptr->stdio_file = 0;

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

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