aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* io.c: IO.copy_stream uses poll on Linuxnormal2015-07-201-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | poll and ppoll have a superior API which doesn't require the kernel to scan a potentially large bitmap to find a high-numbered FD [ruby-core:35572]. So favor using poll in case IO.copy_stream encounters a non-blocking FD. We cannot reliably use poll on most OSes, because file types (e.g. FIFOs) which work with select may not work with poll. Fortunately, Linux uses a common notification mechanism between all select/poll/epoll variants, so all file types are equally supported between the notification mechanisms. Verified by watching strace on the following scripts: *** maygvl_copy_stream_wait_read *** require 'io/nonblock' r, w = IO.pipe r.nonblock = true IO.copy_stream(r, "/dev/null") *** nogvl_copy_stream_wait_write *** require 'io/nonblock' r, w = IO.pipe w.nonblock = true IO.copy_stream("/dev/zero", w) * io.c (nogvl_wait_for_single_fd): new function for Linux (maygvl_copy_stream_wait_read): Linux-specific version (nogvl_copy_stream_wait_write): use nogvl_wait_for_single_fd [ruby-core:70051] [Feature #11377] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (argf_read_nonblock): support `exception: false'normal2015-07-171-12/+27
| | | | | | | | | | | | | | | | | This is a preparation for [ruby-core:69892] ("io.c: avoid kwarg parsing in C API") since I noticed ARGF.read_nonblock did not properly catch up to the `exception: false' change. * io.c (argf_read_nonblock): support `exception: false' (io_nonblock_eof): new function (io_read_nonblock): use io_nonblock_eof (argf_getpartial): accept kwargs hash for `exception: false' * test/ruby/test_argf.rb (test_read_nonblock): new test [ruby-core:70000] [Feature #11358] * NEWS: add item for ARGF.read_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/basicsocket.c: [DOC] typo (Errno::AGAIN -> Errno::EAGAIN)sorah2015-07-121-2/+2
| | | | | | | | | | | | | | * ext/socket/socket.c: ditto * ext/socket/tcpserver.c: ditto * ext/socket/udpsocket.c: ditto * ext/socket/unixserver.c: ditto * io.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* delay `exception: false' checks for minor speedupnormal2015-07-021-34/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay hash lookups until we are about to hit an exception. This gives a minor speedup ratio of 2-3% in the new bm_io_nonblock_noex benchmark as well as reducing code. * benchmark/bm_io_nonblock_noex.rb: new benchmark * ext/openssl/ossl_ssl.c (no_exception_p): new function (ossl_start_ssl): adjust for no_exception_p (ossl_ssl_connect): adjust ossl_start_ssl call (ossl_ssl_connect_nonblock): ditto (ossl_ssl_accept): ditto (ossl_ssl_accept_nonblock): ditto (ossl_ssl_read_internal): adjust for no_exception_p (ossl_ssl_write_internal): ditto (ossl_ssl_write): adjust ossl_write_internal call (ossl_ssl_write_nonblock): ditto * ext/stringio/stringio.c (strio_read_nonblock): delay exception check * io.c (no_exception_p): new function (io_getpartial): call no_exception_p (io_readpartial): adjust for io_getpartial (get_kwargs_exception): remove (io_read_nonblock): adjust for io_getpartial, check no_exception_p on EOF (io_write_nonblock): call no_exception_p (rb_io_write_nonblock): do not check `exception: false' (argf_getpartial): adjust for io_getpartial [ruby-core:69778] [Feature #11318] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: remove unnecessary sharednobu2015-06-301-1/+1
| | | | | | | * io.c (rb_io_reopen): FilePathValue() ensures the path NUL-terminated and frozen, so it is unnecessary to make it shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ensure paths NUL-terminatednobu2015-06-301-0/+1
| | | | | | | | * dir.c (check_dirname): ensure path name NUL-terminated for SHARABLE_MIDDLE_SUBSTRING. * io.c (rb_sysopen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: reopen OS encoding pathnobu2015-06-301-3/+18
| | | | | | | | | * io.c (rb_io_reopen): freopen(3) with OS encoding path. [ruby-core:69780] [Bug #11320] * win32/file.c (rb_freopen): wrapper of wchar version freopen(3). use _wfreopen_s() if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: reopen stdio streams correctly when given "w+"normal2015-06-291-0/+3
| | | | | | | | | | | * io.c (rb_io_oflags_modestr): handle O_TRUNC correctly * test/ruby/test_io.rb (test_reopen_stdio): new test Patch-by: cremno phobia <cremno@mail.ru> [ruby-core:69779] [Bug #11319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: $SAFE=2 is now obsolete.hsbt2015-06-181-5/+0
| | | | | | | | | | * dir.c, ext/fiddle/handle.c, ext/socket/basicsocket.c, file.c gc.c, io.c, process.c, safe.c, signal.c, win32/file.c: removed code for $SAFE=2 * test/erb/test_erb.rb, test/fiddle/test_handle.rb test/ruby/test_env.rb: removed tests for $SAFE=2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_s_binread): close fd if seek offset is invalid.eregon2015-06-131-1/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: simplify rb_io_modestr_fmodenobu2015-06-131-7/+3
| | | | | | | | * io.c (io_encname_bom_p): needs len always. * io.c (rb_io_modestr_fmode): check BOM only after a colon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: reduce size of :wait_*able code pathsnormal2015-06-041-2/+5
| | | | | | | | | | | | | | | * io.c (sym_wait_readable, sym_wait_writable): declare (io_getpartial): use sym_wait_readable (io_write_nonblock): use sym_wait_writable (Init_IO): initialize sym_wait_*able On 32-bit x86: text data bss dec hex filename 121003 56 252 121311 1d9df io.o 121035 56 252 121343 1d9ff io.o.orig git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: refine messagenobu2015-05-251-1/+2
| | | | | | | * io.c (prepare_getline_args): refine the expected arity in an exception message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixes for grammar and style [ci skip]nobu2015-05-211-15/+15
| | | | | | | * io.c (rb_f_select): [DOC] Fixes for grammar and style. [Fix GH-906] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg_parent_end): Declared.akr2015-04-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | * process.c: "spawn" opens files in the parent process. (check_exec_redirect): Add an placeholder for fd in parameters for fd_open. (check_exec_fds_1): Delete fd_open condition. (check_exec_fds): Don't call check_exec_fds_1 with fd_open. (rb_execarg_parent_start): Open files specified as "spawn" options and add "dup2" options. (rb_execarg_parent_end): New function to close opened fds. (run_exec_open): Removed. (rb_execarg_run_options): Don't call run_exec_open. (rb_spawn_internal): Call rb_execarg_parent_end. * io.c (pipe_open): Call rb_execarg_parent_end. * ext/pty/pty.c (establishShell): Call rb_execarg_parent_end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg_parent_start): Renamed from rb_execarg_fixup.akr2015-04-091-2/+2
| | | | | | | | | | | | | * process.c: Follows the above change. * io.c: Ditto. * ext/pty/pty.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: use read/write methods if possiblenobu2015-03-301-39/+44
| | | | | | | | * io.c (copy_stream_body): use the arguments without conversion if having read, readpartial, and write methods, than conversion by to_path method. [ruby-core:68676] [Bug #11015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: winsize on Windowsnobu2015-03-211-1/+1
| | | | | | | | | | | | * ext/io/console/console.c (console_set_winsize): use handle for writing. GetConsoleScreenBufferInfo seems failing on a handle for reading. * io.c: [DOC] update the example of IO#winsize to use $stdout instead of $stdin, which does not work on Windows. a patch by Jan Lelis <mail AT janlelis.de> at [ruby-core:68574]. [Bug #10986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: don't raise after closenobu2015-03-131-8/+8
| | | | | | | * io.c (rb_io_close_read, rb_io_close_write): don't raise after close same as IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: rb_io_get_fptrnobu2015-03-131-9/+13
| | | | | | * io.c (rb_io_get_fptr): return non-null fptr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: duplicate codenobu2015-03-091-1/+0
| | | | | | * io.c (rb_io_close_m): remove duplicate check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: wipe away ioctl buffernobu2015-02-271-0/+1
| | | | | | | | * io.c (setup_narg): wipe away expanded part of buffer to get rid of revealing uncleaned data. reported by Dongkwan Kim <dkay AT kaist.ac.kr>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: discard buffer alwaysnobu2015-02-271-1/+1
| | | | | | | * io.c (copy_stream_fallback_body): discard buffer always before exit or exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: redulce RSTRING_PTR and RSTRING_LENnobu2015-02-261-10/+21
| | | | | | | * io.c: replace repeating RSTRING_PTR and RSTRING_LEN with local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_close_m): Don't raise when the IO object is closed.akr2015-01-151-0/+7
| | | | | | | | [ruby-core:67444] [Feature #10718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: workaround for YARD docnobu2014-12-291-4/+1
| | | | | | | * io.c (rb_f_select): [DOC] workaround for YARD doc. [Fix GH-799] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: Fix spelling [ci skip]nobu2014-12-111-1/+1
| | | | | | | * io.c (io_read) Fix spelling in docco for read. [Fix GH-781] try > tries git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: Typo close -> closes.hone2014-12-071-1/+1
| | | | | | Patch by @cirosantilli [Fixes GH-757] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: fix rdoc [ci skip]nobu2014-12-051-1/+1
| | | | | | * io.c (Init_IO): ARGF is not a class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use 0 for reservednobu2014-12-011-1/+1
| | | | | | | use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_error.c (error_print): respect the encoding of the message.usa2014-11-281-0/+5
| | | | | | | | * io.c (rb_write_error_str): use rb_w32_write_console() on Windows if stderr is a tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: preserve encodingsnobu2014-11-231-3/+3
| | | | | | | * io.c (must_respond_to): preserve encodings of variable name and class name in warning message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: remove redundant assignmentnobu2014-11-221-2/+0
| | | | | | | * io.c (rb_io_sysread): Remove redundan assignment of 'n'. [Fix GH-767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: Gather declarations in non-header files.akr2014-11-181-5/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (FMODE_WSPLIT): Removed. The write() system callakr2014-11-181-49/+3
| | | | | | | | | | | | | | | is not required to split. It was useful to avoid whole process blocking in Ruby 1.8 but not useful since write() is invoked without GVL. (FMODE_WSPLIT_INITIALIZED): Ditto. * io.c (wsplit_p): Removed. (io_writable_length): Removed. (rb_fcntl): Don't update the removed flags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* id.def: move IDs for exceptionnobu2014-11-161-2/+2
| | | | | | | * defs/id.def: add :mesg and :exception and move from other sources. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: Include ruby.h and ruby/encoding.h to beakr2014-11-151-2/+1
| | | | | | | | includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): newusa2014-11-101-0/+6
| | | | | | | | | | | | | | | | | | | | function to support nonblock-mode of pipes. * win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA if there is no data, but also returns it if remote-end is closed. * win32/win32.c (rb_w32_write): if cannot to write any data, it may be blocking. * io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows. * ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when setting nonblock-mode. * test/ruby/test_io.rb: test nonblock pipes on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_binwrite_string): Test writev() failure.akr2014-10-251-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: enclose statements by ifdefnobu2014-10-201-1/+1
| | | | | | | * io.c (maygvl_copy_stream_read): enclose following statements by ifdef, not only a case label. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixes build failures on Portable Native Client.yugui2014-10-111-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: Some of the fixes are for newlib in general but not NaCl-specific. * include/ruby/intern.h (rb_fd_select): declare struct timeval, or the struct gets local to the function in C99. * file.c (#include): add nacl/stat.h for PNaCl. (utimes): added a declaration for PNaCl. (stat_atimespec): stat::st_atimensec is long long but timespec::tv_nsec is long in PNaCl. (stat_mtimespec, stat_ctimespec): ditto. (rb_group_member): disable getgroups unless HAVE_GETGROUPS. (eaccess): unify the fallback to generic defined(USE_GETEUID). * io.c: include sys/time.h for struct timeval. (rb_close_before_exec): nothing we can do if F_GETFD is not available. (ioctl): pnacl newlib actually doesn't have ioctl. * process.c (maxgroups): it is used iff defined(_SC_NGROUPS_MAX) || defined(NGROUPS_MAX) but not defined(HAVE_GETGROUPS) || defined(HAVE_SETGROUPS). (obj2gid): fail unless the object is a Fixnum if getgrnam is not available. (disable_child_handler_fork_child): sigaction is not available in PNaCl newlib. * configure.in (warnflags, strict_warnflags): avoid -ansi for strlcpy. (rb_cv_gcc_atomic_builtins): also check __atomic_or_etch because it is used in ruby_atomic.h. (rb_cv_gcc_sync_builtins): ditto. (HAVE_GETGRNAM): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c: fix issues in the last two commits. don't disable cloexec foryugui2014-10-111-4/+5
| | | | | | | | | | | platforms other than NativeClient. * ChangeLog: ditto. add entries for the last two commits. Sat Oct 11 11:12:00 2014 Yuki Yugui Sonoda <yugui@yugui.jp> * signal.c (install_signalhandler, init_sigchld): allow failure because it always fails with ENOSYS on NaCl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow failure of sighandler installation on NativeClient.yugui2014-10-111-0/+3
| | | | | | | * signal.c (install_signalhandler, init_sigchld): allow failure because it always fails with ENOSYS on NaCl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merges a patch form naclports.yugui2014-10-111-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | * configure.in (RUBY_NACL and others): Supports PNaCl. * dln.c: replace the old hacky dynamic loading over HTTP with nacl_io. * file.c: tenatively use access(2) instead of eaccess. (rb_file_load_ok): weaken with attribute but not by postprocess. * io.c (socket.h): now NaCl has socket.h (flock): disable here instead of nacl/ioctl.h * nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY): respect path to them if they are absolute. This helps naclports to build ruby in their source tree. (PROGRAM_NMF, .SUFFIXES): support .pnexe for PNaCl. (ruby.o, file.o): move the hack to attributes in ruby.c and file.c * nacl/ioctl.h: removed. move the hack to io.c. * nacl/nacl-config.rb: support arm, pnacl and others. * nacl/pepper_main.c: support build in a naclports tree. * ruby.c (rb_load_file): weaken with attribute but not by postprocess. The patch is by sbc@google.com and the Native Client Authors. It is available at: * https://chromium.googlesource.com/external/naclports.git/+/873ca4910a5f9d4206306aacb4ed79c587c6a5f3/ports/ruby/nacl.patch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: fix typonobu2014-10-101-1/+1
| | | | | | * io.c (rb_io_make_open_file): remove useless backslash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: move RFile initializationnobu2014-10-101-0/+54
| | | | | | | * io.c (rb_io_make_open_file): move from include/ruby/io.h, and hide too detailed implementations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: ID instead of Symbolnobu2014-10-051-4/+4
| | | | | | | * io.c (get_kwargs_exception): rb_get_kwargs() expects IDs, but not Symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (fptr_finalize): free memory before GC sweepnormal2014-10-011-0/+6
| | | | | | | | | | | | | | | | | | This releases memory on explict calls to rb_io_close, reducing pressure on the GC. Final massif snapshot shows reduced heap usage after RubyGems load (valgrind --tool=massif ./ruby -e exit) before: mem_heap_B=4821992 mem_heap_extra_B=1302952 after: mem_heap_B=4791056 mem_heap_extra_B=1192440 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: common function to free IO buffersnormal2014-09-251-12/+12
| | | | | | | | | | | | This also allows easier tracking of freed memory for systems without malloc_usable_size, and also makes future changes to freeing buffer memory easier-to-implement. * io.c (free_io_buffer): new function for a common pattern (clear_readconv): use free_io_buffer (rb_io_fptr_finalize): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trivial packing for on-stack structsnormal2014-09-151-2/+2
| | | | | | | | | | * io.c (struct io_advise_struct): 32 => 24 bytes on 64-bit * io.c (struct io_internal_writev_struct): 24 => 16 bytes on 64-bit * process.c (struct waitpid_arg): ditto Slightly reduce stack pressure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e