ruby-changes:6379
From: akr <ko1@a...>
Date: Sat, 5 Jul 2008 23:13:03 +0900 (JST)
Subject: [ruby-changes:6379] Ruby:r17895 (trunk): rename rb_pipe_internal to rb_pipe.
akr 2008-07-05 23:12:53 +0900 (Sat, 05 Jul 2008) New Revision: 17895 Modified files: trunk/include/ruby/intern.h trunk/io.c trunk/process.c Log: rename rb_pipe_internal to rb_pipe. use rb_pipe in pipe_nocrash. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=17895 Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 17894) +++ include/ruby/intern.h (revision 17895) @@ -386,6 +386,7 @@ void rb_write_error2(const char*, long); int rb_io_mode_modenum(const char *mode); void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds); +int rb_pipe(int *pipes); /* marshal.c */ VALUE rb_marshal_dump(VALUE, VALUE); VALUE rb_marshal_load(VALUE); Index: io.c =================================================================== --- io.c (revision 17894) +++ io.c (revision 17895) @@ -3638,8 +3638,8 @@ rb_io_synchronized(fptr); } -static int -rb_pipe_internal(int *pipes) +int +rb_pipe(int *pipes) { int ret; ret = pipe(pipes); @@ -3778,9 +3778,9 @@ arg.write_pair[0] = arg.write_pair[1] = -1; switch (modef & (FMODE_READABLE|FMODE_WRITABLE)) { case FMODE_READABLE|FMODE_WRITABLE: - if (rb_pipe_internal(arg.write_pair) < 0) + if (rb_pipe(arg.write_pair) < 0) rb_sys_fail(cmd); - if (rb_pipe_internal(arg.pair) < 0) { + if (rb_pipe(arg.pair) < 0) { int e = errno; close(arg.write_pair[0]); close(arg.write_pair[1]); @@ -3793,13 +3793,13 @@ } break; case FMODE_READABLE: - if (rb_pipe_internal(arg.pair) < 0) + if (rb_pipe(arg.pair) < 0) rb_sys_fail(cmd); if (eargp) rb_exec_arg_addopt(eargp, INT2FIX(1), INT2FIX(arg.pair[1])); break; case FMODE_WRITABLE: - if (rb_pipe_internal(arg.pair) < 0) + if (rb_pipe(arg.pair) < 0) rb_sys_fail(cmd); if (eargp) rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(arg.pair[0])); @@ -6227,7 +6227,7 @@ rb_io_t *fptr; rb_scan_args(argc, argv, "02", &v1, &v2); - if (rb_pipe_internal(pipes) == -1) + if (rb_pipe(pipes) == -1) rb_sys_fail(0); args[0] = klass; Index: process.c =================================================================== --- process.c (revision 17894) +++ process.c (revision 17895) @@ -2255,7 +2255,7 @@ pipe_nocrash(int filedes[2], VALUE fds) { int ret; - ret = pipe(filedes); + ret = rb_pipe(filedes); if (ret == -1) return -1; if (RTEST(fds)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/