Mark Encoding as Write Barrier protected

It doesn't even have a mark function.
It's only about a hundred objects, but not reason
to scan them every time.
This commit is contained in:
Jean Boussier 2023-02-06 23:18:34 +01:00 коммит произвёл Jean Boussier
Родитель 6e4c242130
Коммит 60c924770d
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -102,7 +102,7 @@ static rb_encoding *global_enc_ascii,
static const rb_data_type_t encoding_data_type = { static const rb_data_type_t encoding_data_type = {
"encoding", "encoding",
{0, 0, 0,}, {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) #define is_data_encoding(obj) (RTYPEDDATA_P(obj) && RTYPEDDATA_TYPE(obj) == &encoding_data_type)