mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
set. this is the one of the reason of IO writing slowness of Windows in 1.9.3 or later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1b79efbb39
commit
53881a8c6d
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Nov 8 14:50:55 2011 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
|
||||
set. this is the one of the reason of IO writing slowness of Windows
|
||||
in 1.9.3 or later.
|
||||
|
||||
Tue Nov 8 11:01:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/pty/pty.c (get_device_once): FreeBSD's posix_openpt doesn't
|
||||
|
|
2
io.c
2
io.c
|
@ -1085,8 +1085,10 @@ static long
|
|||
io_fwrite(VALUE str, rb_io_t *fptr, int nosync)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (fptr->mode & FMODE_TTY) {
|
||||
long len = rb_w32_write_console(str, fptr->fd);
|
||||
if (len > 0) return len;
|
||||
}
|
||||
#endif
|
||||
str = do_writeconv(str, fptr);
|
||||
return io_binwrite(str, RSTRING_PTR(str), RSTRING_LEN(str),
|
||||
|
|
Loading…
Reference in a new issue