diff options
author | Jean Boussier <[email protected]> | 2023-11-22 15:23:02 +0100 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2023-11-22 18:42:04 +0100 |
commit | c8d99fa662e459f678e0dd12a2d954a20cc1a97e (patch) | |
tree | e156ea33df3c851304cc4ca2c424e059732271a3 /thread.c | |
parent | 295d648f766d46c5da059dac26b0373f986b6a28 (diff) |
Embed ThreadGroup object
These are rare but embedding them is trivial and make them fit
in a 40B slot.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -4693,16 +4693,14 @@ struct thgroup { int enclosed; }; -static size_t -thgroup_memsize(const void *ptr) -{ - return sizeof(struct thgroup); -} - static const rb_data_type_t thgroup_data_type = { "thgroup", - {0, RUBY_TYPED_DEFAULT_FREE, thgroup_memsize,}, - 0, 0, RUBY_TYPED_FREE_IMMEDIATELY + { + 0, + RUBY_TYPED_DEFAULT_FREE, + NULL, // No external memory to report + }, + 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_EMBEDDABLE }; /* |