diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-01 15:26:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-01 15:26:39 +0000 |
commit | b5423e44726480a04a82dc32374783d74ac470cb (patch) | |
tree | 331c885ef37458a1da345404bdfd77d8ccb470a0 /ext/socket | |
parent | 992a1f12eec0411ba46a2547abd8a90d4caf6015 (diff) | |
download | ruby-b5423e44726480a04a82dc32374783d74ac470cb.tar.gz ruby-b5423e44726480a04a82dc32374783d74ac470cb.tar.xz ruby-b5423e44726480a04a82dc32374783d74ac470cb.zip |
* ext/socket/socket.c (init_sock): no need for special finalizer,
socket descriptor is no longer duplicated in 1.7.
[ruby-talk:50732]
* win32/win32.c, win32/win32.h (rb_w32_fddup, rb_w32_fdclose):
delete.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/socket.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index a89e8f910..1c671fdb6 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -163,23 +163,6 @@ ruby_getaddrinfo(nodename, servname, hints, res) #define close closesocket #endif -#ifdef NT -static void sock_finalize _((OpenFile *fptr)); - -static void -sock_finalize(fptr) - OpenFile *fptr; -{ - SOCKET s; - - if (!fptr->f) return; - s = get_osfhandle(fileno(fptr->f)); - rb_w32_fdclose(fptr->f); - if (fptr->f2) rb_w32_fdclose(fptr->f2); - closesocket(s); -} -#endif - static VALUE init_sock(sock, fd) VALUE sock; @@ -189,9 +172,6 @@ init_sock(sock, fd) MakeOpenFile(sock, fp); fp->f = rb_fdopen(fd, "r"); -#ifdef NT - fp->finalize = sock_finalize; -#endif fp->f2 = rb_fdopen(fd, "w"); fp->mode = FMODE_READWRITE; rb_io_synchronized(fp); |