diff options
author | Samuel Williams <[email protected]> | 2023-06-01 14:23:30 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-01 14:23:30 +0900 |
commit | a218ed569243e7544d8c4e3b348245a17f6c6a51 (patch) | |
tree | 6e439e7661b110bf2b3ee9fa6e2b8df54e72a92a /win32/win32.c | |
parent | 35da41b29bf0a1a8fd2cd7e1d7fcb036ca8c2c7c (diff) |
Hide the usage of `rb_io_t` where possible. (#7880)
This retries the compatible parts of the previously reverted PR so we can continue to update related code without breaking backwards compatibility.
Notes
Notes:
Merged-By: ioquatix <[email protected]>
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/win32/win32.c b/win32/win32.c index ec65f5383b..c2d12a79f4 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -8269,10 +8269,7 @@ w32_io_info(VALUE *file, w32_io_info_t *st) tmp = rb_check_convert_type_with_id(*file, T_FILE, "IO", idTo_io); if (!NIL_P(tmp)) { - rb_io_t *fptr; - - GetOpenFile(tmp, fptr); - f = (HANDLE)rb_w32_get_osfhandle(fptr->fd); + f = (HANDLE)rb_w32_get_osfhandle(rb_io_descriptor(tmp)); if (f == (HANDLE)-1) return INVALID_HANDLE_VALUE; } else { |