ruby-changes:3590
From: ko1@a...
Date: Wed, 16 Jan 2008 18:03:29 +0900 (JST)
Subject: [ruby-changes:3590] nobu - Ruby:r15079 (trunk): * io.c (pipe_open, rb_io_s_popen): clear temporary object to release
nobu 2008-01-16 18:03:12 +0900 (Wed, 16 Jan 2008)
New Revision: 15079
Modified files:
trunk/ChangeLog
trunk/io.c
Log:
* io.c (pipe_open, rb_io_s_popen): clear temporary object to release
and prevent from GC.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15079&r2=15078&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=15079&r2=15078&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 15078)
+++ ChangeLog (revision 15079)
@@ -1,3 +1,8 @@
+Wed Jan 16 18:03:10 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * io.c (pipe_open, rb_io_s_popen): clear temporary object to release
+ and prevent from GC.
+
Wed Jan 16 17:55:07 2008 NAKAMURA Usaku <usa@r...>
* numeric.c (fix_quo): typo. a patch from Shin-ichiro HARA
Index: io.c
===================================================================
--- io.c (revision 15078)
+++ io.c (revision 15079)
@@ -3626,6 +3626,7 @@
exename = cmd;
cmdbuf = rb_str_tmp_new(rb_w32_argv_size(args));
cmd = rb_w32_join_argv(RSTRING_PTR(cmdbuf), args);
+ rb_str_resize(argbuf, 0);
}
while ((pid = rb_w32_pipe_exec(cmd, exename, openmode, &fd, &write_fd)) == -1) {
/* exec failed */
@@ -3775,6 +3776,7 @@
tmp = rb_ary_dup(tmp);
RBASIC(tmp)->klass = 0;
port = pipe_open_v(RARRAY_LEN(tmp), RARRAY_PTR(tmp), mode);
+ rb_ary_clear(tmp);
}
else {
SafeStringValue(pname);
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/