8000 * io.c (io_binwrite): allocate wbuf if nosync. · documenting-ruby/ruby@c1759a9 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit c1759a9

Browse files
committed
* io.c (io_binwrite): allocate wbuf if nosync.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 0f1a107 commit c1759a9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Tue Sep 23 21:50:53 2008 Tanaka Akira <akr@fsij.org>
2+
3+
* io.c (io_binwrite): allocate wbuf if nosync.
4+
15
Tue Sep 23 21:45:02 2008 Tanaka Akira <akr@fsij.org>
26

37
* io.c (copy_stream_body): use io_binwrite instead of io_fwrite.

io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ io_binwrite(VALUE str, rb_io_t *fptr, int nosync)
751751

752752
len = RSTRING_LEN(str);
753753
if ((n = len) <= 0) return n;
754-
if (fptr->wbuf == NULL && !(fptr->mode & FMODE_SYNC)) {
754+
if (fptr->wbuf == NULL && !(!nosync && (fptr->mode & FMODE_SYNC))) {
755755
fptr->wbuf_off = 0;
756756
fptr->wbuf_len = 0;
757757
fptr->wbuf_capa = 8192;

0 commit comments

Comments
 (0)
0