mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Make Enumerator::Product write-barrier protected
This commit is contained in:
parent
3e1e2bda49
commit
a9230e76ee
1 changed files with 3 additions and 3 deletions
|
@ -3388,7 +3388,7 @@ static const rb_data_type_t enum_product_data_type = {
|
|||
enum_product_memsize,
|
||||
enum_product_mark_and_move,
|
||||
},
|
||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
|
||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
|
||||
};
|
||||
|
||||
static struct enum_product *
|
||||
|
@ -3444,7 +3444,7 @@ enum_product_initialize(int argc, VALUE *argv, VALUE obj)
|
|||
|
||||
if (!ptr) rb_raise(rb_eArgError, "unallocated product");
|
||||
|
||||
ptr->enums = rb_ary_freeze(enums);
|
||||
RB_OBJ_WRITE(obj, &ptr->enums, rb_ary_freeze(enums));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
@ -3462,7 +3462,7 @@ enum_product_init_copy(VALUE obj, VALUE orig)
|
|||
|
||||
if (!ptr1) rb_raise(rb_eArgError, "unallocated product");
|
||||
|
||||
ptr1->enums = ptr0->enums;
|
||||
RB_OBJ_WRITE(obj, &ptr1->enums, ptr0->enums);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue