1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/socket.c (connect_blocking, socks_connect_blocking,

ruby_connect): cast.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2008-07-22 07:09:34 +00:00
parent 9654ea62cc
commit e4d911fa98
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Tue Jul 22 16:08:58 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/socket/socket.c (connect_blocking, socks_connect_blocking,
ruby_connect): cast.
Tue Jul 22 11:05:08 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* test/ruby/test_dir.rb: use realpath of tmpdir. [ruby-dev:35481]

View file

@ -1146,7 +1146,7 @@ static VALUE
connect_blocking(void *data)
{
struct connect_arg *arg = data;
return connect(arg->fd, arg->sockaddr, arg->len);
return (VALUE)connect(arg->fd, arg->sockaddr, arg->len);
}
#if defined(SOCKS) && !defined(SOCKS5)
@ -1154,7 +1154,7 @@ static VALUE
socks_connect_blocking(void *data)
{
struct connect_arg *arg = data;
return Rconnect(arg->fd, arg->sockaddr, arg->len);
return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len);
}
#endif
@ -1177,7 +1177,7 @@ ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
if (socks) func = socks_connect_blocking;
#endif
for (;;) {
status = BLOCKING_REGION(func, &arg);
status = (int)BLOCKING_REGION(func, &arg);
if (status < 0) {
switch (errno) {
case EAGAIN: