ruby-changes:28101
From: akr <ko1@a...>
Date: Sat, 6 Apr 2013 13:35:42 +0900 (JST)
Subject: [ruby-changes:28101] akr:r40153 (trunk): * ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument.
akr 2013-04-06 13:35:29 +0900 (Sat, 06 Apr 2013) New Revision: 40153 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40153 Log: * ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument. * ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above change. Modified files: trunk/ChangeLog trunk/ext/socket/rubysocket.h trunk/ext/socket/socket.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40152) +++ ChangeLog (revision 40153) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Apr 6 13:34:20 2013 Tanaka Akira <akr@f...> + + * ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument. + + * ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above + change. + Sat Apr 6 13:13:39 2013 Tanaka Akira <akr@f...> * ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect only Index: ext/socket/rubysocket.h =================================================================== --- ext/socket/rubysocket.h (revision 40152) +++ ext/socket/rubysocket.h (revision 40153) @@ -335,6 +335,6 @@ void rsock_init_socket_init(void); https://github.com/ruby/ruby/blob/trunk/ext/socket/rubysocket.h#L335 NORETURN(void rsock_sys_fail_host_port(const char *, VALUE, VALUE)); NORETURN(void rsock_sys_fail_path(const char *, VALUE)); -NORETURN(void rsock_sys_fail_sockaddr(const char *, VALUE, VALUE)); +NORETURN(void rsock_sys_fail_sockaddr(const char *, VALUE)); #endif Index: ext/socket/socket.c =================================================================== --- ext/socket/socket.c (revision 40152) +++ ext/socket/socket.c (revision 40153) @@ -47,9 +47,9 @@ rsock_sys_fail_path(const char *mesg, VA https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L47 } void -rsock_sys_fail_sockaddr(const char *mesg, VALUE sock, VALUE addr) +rsock_sys_fail_sockaddr(const char *mesg, VALUE addr) { - VALUE host_port = sock_s_unpack_sockaddr_in(sock, addr); + VALUE host_port = sock_s_unpack_sockaddr_in(rb_cSocket, addr); rsock_sys_fail_host_port(mesg, RARRAY_PTR(host_port)[1], @@ -359,7 +359,7 @@ sock_connect(VALUE sock, VALUE addr) https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L359 fd = fptr->fd; n = rsock_connect(fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LENINT(addr), 0); if (n < 0) { - rsock_sys_fail_sockaddr("connect(2)", sock, addr); + rsock_sys_fail_sockaddr("connect(2)", addr); } return INT2FIX(n); @@ -421,7 +421,7 @@ sock_connect_nonblock(VALUE sock, VALUE https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L421 if (n < 0) { if (errno == EINPROGRESS) rb_mod_sys_fail(rb_mWaitWritable, "connect(2) would block"); - rsock_sys_fail_sockaddr("connect(2)", sock, addr); + rsock_sys_fail_sockaddr("connect(2)", addr); } return INT2FIX(n); @@ -521,7 +521,7 @@ sock_bind(VALUE sock, VALUE addr) https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L521 SockAddrStringValue(addr); GetOpenFile(sock, fptr); if (bind(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LENINT(addr)) < 0) - rsock_sys_fail_sockaddr("bind(2)", sock, addr); + rsock_sys_fail_sockaddr("bind(2)", addr); return INT2FIX(0); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/