зеркало из https://github.com/github/ruby.git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1e965f4f9a
Коммит
11fef7fd63
|
@ -1,3 +1,11 @@
|
|||
Thu Jun 29 07:45:33 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||
|
||||
* ext/socket/socket.c (udp_send): destination may be packed
|
||||
struct sockaddr.
|
||||
|
||||
* object.c (rb_Integer): Integer(nil) should be invalid, on the
|
||||
other hand, nil.to_i is OK.
|
||||
|
||||
Wed Jun 28 17:26:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||
|
||||
* ext/socket/socket.c (ip_recvfrom): udp_recvfrom and tcp_recvfrom
|
||||
|
|
|
@ -104,7 +104,7 @@ struct sockaddr_storage {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(INET6) && (defined(LOOKUP_ORDER_HACK_INET) || defined(LOOKUP_ORDER_HACK_INET))
|
||||
#if defined(INET6) && (defined(LOOKUP_ORDER_HACK_INET) || defined(LOOKUP_ORDER_HACK_INET6))
|
||||
#define LOOKUP_ORDERS 3
|
||||
static int lookup_order_table[LOOKUP_ORDERS] = {
|
||||
#if defined(LOOKUP_ORDER_HACK_INET)
|
||||
|
@ -381,7 +381,7 @@ bsock_send(argc, argv, sock)
|
|||
retry:
|
||||
rb_thread_fd_writable(fd);
|
||||
m = rb_str2cstr(msg, &mlen);
|
||||
if (RTEST(to)) {
|
||||
if (!NIL_P(to)) {
|
||||
t = rb_str2cstr(to, &tlen);
|
||||
n = sendto(fd, m, mlen, NUM2INT(flags),
|
||||
(struct sockaddr*)t, tlen);
|
||||
|
@ -611,15 +611,6 @@ ip_addrsetup(host, port)
|
|||
return res;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
ip_recvfrom(argc, argv, sock)
|
||||
int argc;
|
||||
VALUE *argv;
|
||||
VALUE sock;
|
||||
{
|
||||
return s_recvfrom(sock, argc, argv, RECV_IP);
|
||||
}
|
||||
|
||||
static void
|
||||
setipaddr(name, addr)
|
||||
VALUE name;
|
||||
|
@ -1167,6 +1158,15 @@ ip_peeraddr(sock)
|
|||
return ipaddr((struct sockaddr *)&addr);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
ip_recvfrom(argc, argv, sock)
|
||||
int argc;
|
||||
VALUE *argv;
|
||||
VALUE sock;
|
||||
{
|
||||
return s_recvfrom(sock, argc, argv, RECV_IP);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
ip_s_getaddress(obj, host)
|
||||
VALUE obj, host;
|
||||
|
@ -1259,7 +1259,7 @@ udp_send(argc, argv, sock)
|
|||
int mlen;
|
||||
struct addrinfo *res0, *res;
|
||||
|
||||
if (argc == 2) {
|
||||
if (argc == 2 || argc == 3) {
|
||||
return bsock_send(argc, argv, sock);
|
||||
}
|
||||
rb_secure(4);
|
||||
|
|
4
object.c
4
object.c
|
@ -893,8 +893,8 @@ rb_Integer(val)
|
|||
case T_STRING:
|
||||
return rb_str2inum(val, 0);
|
||||
|
||||
case T_NIL:
|
||||
return INT2FIX(0);
|
||||
case T_FIXNUM:
|
||||
return val;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define RUBY_VERSION "1.5.4"
|
||||
#define RUBY_RELEASE_DATE "2000-06-28"
|
||||
#define RUBY_RELEASE_DATE "2000-06-29"
|
||||
#define RUBY_VERSION_CODE 154
|
||||
#define RUBY_RELEASE_CODE 20000628
|
||||
#define RUBY_RELEASE_CODE 20000629
|
||||
|
|
Загрузка…
Ссылка в новой задаче