diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-01 08:31:49 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-01 08:31:49 +0000 |
commit | de373b1b6cddf602cad483b7ede7b378666d837c (patch) | |
tree | a528c42a0de4c92f7dd999523f0b477d2f4faa6c /ext | |
parent | 360453ce14e637e653005232aab50e6294a3fa48 (diff) |
* io.c (rb_io_fptr_cleanup): need flush even when io will not be
closed.
* io.c (rb_io_initialize): was calling wrong function
rb_io_mode_flags().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/racc/cparse/cparse.c | 2 | ||||
-rw-r--r-- | ext/socket/socket.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c index 314e6a39c8..84d0af8295 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse/cparse.c @@ -253,6 +253,8 @@ racc_yyparse(parser, recv, mid, arg, indebug) return v->retval; } +static VALUE call_scaniter _((VALUE)); + static VALUE call_scaniter(data) VALUE data; diff --git a/ext/socket/socket.c b/ext/socket/socket.c index b3cdf6248a..cc76bec78c 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -186,7 +186,6 @@ init_sock(sock, fd) fp->f = rb_fdopen(fd, "r"); #ifdef NT fp->finalize = sock_finalize; -#else #endif fp->f2 = rb_fdopen(fd, "w"); fp->mode = FMODE_READWRITE; @@ -199,7 +198,13 @@ static VALUE bsock_s_for_fd(klass, fd) VALUE klass, fd; { - return init_sock(rb_obj_alloc(klass), NUM2INT(fd)); + OpenFile *fptr; + VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd)); + + GetOpenFile(sock, fptr); + fptr->mode |= FMODE_FDOPEN; + + return sock; } static VALUE |