summaryrefslogtreecommitdiff
path: root/ext/socket/basicsocket.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-28 08:14:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-28 08:14:13 +0000
commit4822d20cc55d54d0c3cb190fdcb343976db64901 (patch)
tree5c6d684e1615f4c0559fff9480ed25f2c3e5c887 /ext/socket/basicsocket.c
parent790d6071c6d0d2c677b01779fecb891d64095ded (diff)
* ext/socket: fixed types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/basicsocket.c')
-rw-r--r--ext/socket/basicsocket.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index 0316f99..e744ad2 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -238,12 +238,12 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
case T_TRUE:
i = 1;
numval:
- v = (char*)&i; vlen = sizeof(i);
+ v = (char*)&i; vlen = (int)sizeof(i);
break;
default:
StringValue(val);
v = RSTRING_PTR(val);
- vlen = RSTRING_LEN(val);
+ vlen = RSTRING_LENINT(val);
break;
}
@@ -357,7 +357,7 @@ static VALUE
bsock_getsockname(VALUE sock)
{
struct sockaddr_storage buf;
- socklen_t len = sizeof buf;
+ socklen_t len = (socklen_t)sizeof buf;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
@@ -386,7 +386,7 @@ static VALUE
bsock_getpeername(VALUE sock)
{
struct sockaddr_storage buf;
- socklen_t len = sizeof buf;
+ socklen_t len = (socklen_t)sizeof buf;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
@@ -474,7 +474,7 @@ static VALUE
bsock_local_address(VALUE sock)
{
struct sockaddr_storage buf;
- socklen_t len = sizeof buf;
+ socklen_t len = (socklen_t)sizeof buf;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
@@ -506,7 +506,7 @@ static VALUE
bsock_remote_address(VALUE sock)
{
struct sockaddr_storage buf;
- socklen_t len = sizeof buf;
+ socklen_t len = (socklen_t)sizeof buf;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
@@ -549,7 +549,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 = RSTRING_LEN(to);
+ arg.tolen = (socklen_t)RSTRING_LENINT(to);
func = rsock_sendto_blocking;
}
else {