Skip to content

Commit

Permalink
Mark Encoding as Write Barrier protected
Browse files Browse the repository at this point in the history
It doesn't even have a mark function.
It's only about a hundred objects, but not reason
to scan them every time.
  • Loading branch information
byroot committed Feb 7, 2023
1 parent 6e4c242 commit 60c9247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static rb_encoding *global_enc_ascii,
static const rb_data_type_t encoding_data_type = {
"encoding",
{0, 0, 0,},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
};

#define is_data_encoding(obj) (RTYPEDDATA_P(obj) && RTYPEDDATA_TYPE(obj) == &encoding_data_type)
Expand Down

0 comments on commit 60c9247

Please sign in to comment.