* 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
This commit is contained in:
nobu 2015-11-05 01:17:19 +00:00
Родитель d2e48a3f01
Коммит 612978edbc
4 изменённых файлов: 15 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,12 @@
Thu Nov 5 10:17:17 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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 <nobu@ruby-lang.org>
* ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR.

Просмотреть файл

@ -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));

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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)) {