summaryrefslogtreecommitdiff
path: root/ext/socket/udpsocket.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 15:20:15 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commit703783324c16b8b2b50210d1a7d1119902abbb8b (patch)
treed594ba9029a1ddcee223fcb2f39be07ef20daca1 /ext/socket/udpsocket.c
parent5c7c2d9951f2512ca10ea38fecc48d8ac67502e6 (diff)
rb_ensure now free from ANYARGS
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_ensure, which also revealed many arity / type mismatches.
Diffstat (limited to 'ext/socket/udpsocket.c')
-rw-r--r--ext/socket/udpsocket.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index c2e273c2a3..6ef8242a1e 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -50,8 +50,9 @@ struct udp_arg
};
static VALUE
-udp_connect_internal(struct udp_arg *arg)
+udp_connect_internal(VALUE v)
{
+ struct udp_arg *arg = (void *)v;
rb_io_t *fptr;
int fd;
struct addrinfo *res;
@@ -97,8 +98,9 @@ udp_connect(VALUE sock, VALUE host, VALUE port)
}
static VALUE
-udp_bind_internal(struct udp_arg *arg)
+udp_bind_internal(VALUE v)
{
+ struct udp_arg *arg = (void *)v;
rb_io_t *fptr;
int fd;
struct addrinfo *res;
@@ -147,8 +149,9 @@ struct udp_send_arg {
};
static VALUE
-udp_send_internal(struct udp_send_arg *arg)
+udp_send_internal(VALUE v)
{
+ struct udp_send_arg *arg = (void *)v;
rb_io_t *fptr;
int n;
struct addrinfo *res;