summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2023-06-01 14:23:30 +0900
committerGitHub <noreply@github.com>2023-06-01 14:23:30 +0900
commita218ed569243e7544d8c4e3b348245a17f6c6a51 (patch)
tree6e439e7661b110bf2b3ee9fa6e2b8df54e72a92a /win32
parent35da41b29bf0a1a8fd2cd7e1d7fcb036ca8c2c7c (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 <samuel@codeotaku.com>
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c5
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 {