summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-05 01:17:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-05 01:17:19 +0000
commit612978edbce91268ca81a98af8eb89c583d2131a (patch)
tree11d4a1de425fef35b8d3f6fa5b9d739cfe7469a5 /ext/socket/socket.c
parentd2e48a3f01d9ce2fa6fd860ad5bd2fee28e29e66 (diff)
ext: use RARRAY_ASET
* ext/socket/socket.c (make_addrinfo): use RARRAY_ASET for write-barrier. * ext/tk/tcltklib.c ({call,eval,invoke}_queue_handler): ditto. * ext/tk/tkutil/tkutil.c (ary2list, ary2list2): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 8a3541a..779398c 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1095,7 +1095,7 @@ make_addrinfo(struct rb_addrinfo *res0, int norevlookup)
for (res = res0->ai; res; res = res->ai_next) {
ary = rsock_ipaddr(res->ai_addr, res->ai_addrlen, norevlookup);
if (res->ai_canonname) {
- RARRAY_PTR(ary)[2] = rb_str_new2(res->ai_canonname);
+ RARRAY_ASET(ary, 2, rb_str_new2(res->ai_canonname));
}
rb_ary_push(ary, INT2FIX(res->ai_family));
rb_ary_push(ary, INT2FIX(res->ai_socktype));