summaryrefslogtreecommitdiff
path: root/ext/io/console/console.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-31 22:56:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-31 22:56:07 +0000
commitc90d5be882ea616e281361fa72bce8bae8f4f8d3 (patch)
tree2fe3ba22143bf7c8240b130d3f06cf417f4db589 /ext/io/console/console.c
parentfb672259d926027f4af16847a1aafe8c81506625 (diff)
* ext/io/console/console.c (console_winsize): use GetWriteFD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/console/console.c')
-rw-r--r--ext/io/console/console.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index 11bb40435a4..299a0ccf365 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -387,17 +387,7 @@ console_winsize(VALUE io)
rb_console_size_t ws;
GetOpenFile(io, fptr);
-#ifdef GetWriteFile
- fd = fileno(GetWriteFile(fptr));
-#else
-# if defined HAVE_RB_IO_GET_WRITE_IO
- io = fptr->tied_io_for_writing;
- if (io) {
- GetOpenFile(io, fptr);
- }
-# endif
- fd = fptr->fd;
-#endif
+ fd = GetWriteFD(fptr);
if (!getwinsize(fd, &ws)) rb_sys_fail(0);
return rb_assoc_new(INT2NUM(winsize_row(&ws)), INT2NUM(winsize_col(&ws)));
}