diff options
author | Peter Zhu <[email protected]> | 2023-11-22 10:54:32 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-11-27 08:29:35 -0500 |
commit | 2e4a0a4d90205224703a958fc9e4de61f6436aae (patch) | |
tree | 101696b93f936f677c265cea6c2306dc8f793061 /enumerator.c | |
parent | 2dadd17c780108d9f98989578149a091ff2c0f50 (diff) |
Implement Write Barriers on Enumerator::Producer
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/enumerator.c b/enumerator.c index 8e86176c90..a90a594397 100644 --- a/enumerator.c +++ b/enumerator.c @@ -2945,7 +2945,7 @@ static const rb_data_type_t producer_data_type = { producer_memsize, producer_compact, }, - 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_EMBEDDABLE + 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_EMBEDDABLE }; static struct producer * @@ -2985,8 +2985,8 @@ producer_init(VALUE obj, VALUE init, VALUE proc) rb_raise(rb_eArgError, "unallocated producer"); } - ptr->init = init; - ptr->proc = proc; + RB_OBJ_WRITE(obj, &ptr->init, init); + RB_OBJ_WRITE(obj, &ptr->proc, proc); return obj; } |