summaryrefslogtreecommitdiff
path: root/ext/socket/basicsocket.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 07:58:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 07:58:51 +0000
commitc7135ddd2dcd59ca46ea3307b21f68dea7504ac8 (patch)
treeca957b72291232741b6d7f14b9dd32fefb9e2d61 /ext/socket/basicsocket.c
parent7e4a95cd062ac961a91b7b7185b75c103bc7496d (diff)
socket/extconf.rb: RSTRING_SOCKLEN
* ext/socket/extconf.rb (RSTRING_SOCKLEN): macro to cast RSTRING_LEN to socklen_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/basicsocket.c')
-rw-r--r--ext/socket/basicsocket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index 94c34da..19dc2f5 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -243,7 +243,7 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
default:
StringValue(val);
v = RSTRING_PTR(val);
- vlen = RSTRING_LENINT(val);
+ vlen = RSTRING_SOCKLEN(val);
break;
}
@@ -555,7 +555,7 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
SockAddrStringValue(to);
to = rb_str_new4(to);
arg.to = (struct sockaddr *)RSTRING_PTR(to);
- arg.tolen = (socklen_t)RSTRING_LENINT(to);
+ arg.tolen = RSTRING_SOCKLEN(to);
func = rsock_sendto_blocking;
}
else {