diff --git a/ChangeLog b/ChangeLog index 93a222b538..242f21a512 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Thu Nov 5 10:17:17 2015 Nobuyoshi Nakada + + * 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. + Thu Nov 5 10:09:12 2015 Nobuyoshi Nakada * ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR. diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 8a3541ac30..779398c88d 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)); diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index a91aaabb37..47dc52a337 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -7033,7 +7033,7 @@ call_queue_handler(evPtr, flags) } /* set result */ - RARRAY_PTR(q->result)[0] = ret; + RARRAY_ASET(q->result, 0, ret); ret = (VALUE)NULL; /* decr internal handler mark */ @@ -7525,7 +7525,7 @@ eval_queue_handler(evPtr, flags) } /* set result */ - RARRAY_PTR(q->result)[0] = ret; + RARRAY_ASET(q->result, 0, ret); ret = (VALUE)NULL; /* decr internal handler mark */ @@ -9026,7 +9026,7 @@ invoke_queue_handler(evPtr, flags) } /* set result */ - RARRAY_PTR(q->result)[0] = ret; + RARRAY_ASET(q->result, 0, ret); ret = (VALUE)NULL; /* decr internal handler mark */ diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index 1a3720523e..7dbbc0dbd0 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -481,7 +481,7 @@ ary2list(ary, enc_flag, self) } else { str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val); } - RARRAY_PTR(dst)[idx] = str_val; + RARRAY_ASET(dst, idx, str_val); } val = rb_apply(cTclTkLib, ID_merge_tklist, dst); if (RB_TYPE_P(dst_enc, T_STRING)) { @@ -575,7 +575,7 @@ ary2list2(ary, enc_flag, self) } else { str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val); } - RARRAY_PTR(dst)[idx] = str_val; + RARRAY_ASET(dst, idx, str_val); } val = rb_apply(cTclTkLib, ID_merge_tklist, dst); if (RB_TYPE_P(dst_enc, T_STRING)) {