summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 04:35:29 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 04:35:29 +0000
commitb1fd376cbfbccc523921a950b1bc6bcaa01c0f99 (patch)
tree31c6766b7f1bee4b87243e5720c5d678ddcfd44b
parent8c6c73745ec6ace79e2fbb3655439acfb2d82f62 (diff)
* ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument.
* ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--ext/socket/rubysocket.h2
-rw-r--r--ext/socket/socket.c10
3 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 32ca122..d717392 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Apr 6 13:34:20 2013 Tanaka Akira <akr@fsij.org>
+
+ * 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@fsij.org>
* ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect only
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index b0d7881..5dd742b 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -335,6 +335,6 @@ void rsock_init_socket_init(void);
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
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 3ee725d..f4d8b3f 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -47,9 +47,9 @@ rsock_sys_fail_path(const char *mesg, VALUE path)
}
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)
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 addr)
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)
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);
}