ruby/win32
Samuel Williams 18e55fc1e1
Hide most of the implementation of struct rb_io. (#6511)
* Add rb_io_path and rb_io_open_descriptor.

* Use rb_io_open_descriptor to create PTY objects

* Rename FMODE_PREP -> FMODE_EXTERNAL and expose it

FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but
FMODE_EXTERNAL is clearer about what the file descriptor represents and
aligns with language in the IO::Buffer module.

* Ensure that rb_io_open_descriptor closes the FD if it fails

If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be
responsible for closing your file, eventually, if you pass it to
rb_io_open_descriptor, even if it raises an exception.

* Rename IS_EXTERNAL_FD -> RUBY_IO_EXTERNAL_P

* Expose `rb_io_closed_p`.

* Add `rb_io_mode` to get IO mode.

---------

Co-authored-by: KJ Tsanaktsidis <ktsanaktsidis@zendesk.com>
2023-05-30 10:02:40 +09:00
..
configure.bat Add GMP support for mswin 2022-09-13 15:44:29 +09:00
dir.h [win32] Only include base windows types 2022-10-26 10:42:03 +09:00
enc-setup.mak
file.c Revert "reuse open(2) from rb_file_load_ok on POSIX-like system" 2023-02-27 09:24:45 -08:00
file.h Add support for sockaddr_un on Windows. (#6513) 2022-11-17 14:50:25 -08:00
ifchange.bat Auto-generate the release date on version.h from git CommitDate (#6382) 2022-09-17 21:16:06 +09:00
makedirs.bat
Makefile.sub Use Lrama LALR parser generator instead of Bison 2023-05-12 18:25:10 +09:00
mkexports.rb Prefer to use File.foreach instead of IO.foreach 2023-02-27 18:49:18 +09:00
resource.rb Use class methods of File over Kernel.open and IO.read 2022-12-01 02:28:49 +09:00
rm.bat
rmdirs.bat
rtname.cmd
ruby.manifest
setup.mak s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
win32.c Hide most of the implementation of struct rb_io. (#6511) 2023-05-30 10:02:40 +09:00
winmain.c