mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB because
there are not new relations. * enum.c (enum_sort_by): ditto. * struct.c (setup_struct): use RARRAY_RAWPTR(). * vm_eval.c (yield_under): ditto. * ext/pathname/pathname.c (path_entries): use RARRAY_AREF(). * ext/pathname/pathname.c (path_s_glob): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bf2a494ebc
commit
ad0ef29da7
6 changed files with 26 additions and 9 deletions
4
struct.c
4
struct.c
|
@ -197,7 +197,7 @@ new_struct(VALUE name, VALUE super)
|
|||
static VALUE
|
||||
setup_struct(VALUE nstr, VALUE members)
|
||||
{
|
||||
VALUE *ptr_members;
|
||||
const VALUE *ptr_members;
|
||||
long i, len;
|
||||
|
||||
OBJ_FREEZE(members);
|
||||
|
@ -207,7 +207,7 @@ setup_struct(VALUE nstr, VALUE members)
|
|||
rb_define_singleton_method(nstr, "new", rb_class_new_instance, -1);
|
||||
rb_define_singleton_method(nstr, "[]", rb_class_new_instance, -1);
|
||||
rb_define_singleton_method(nstr, "members", rb_struct_s_members_m, 0);
|
||||
ptr_members = RARRAY_PTR(members);
|
||||
ptr_members = RARRAY_RAWPTR(members);
|
||||
len = RARRAY_LEN(members);
|
||||
for (i=0; i< len; i++) {
|
||||
ID id = SYM2ID(ptr_members[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue