Move attached_object into rb_classext_struct

Given that signleton classes don't have an allocator,
we can re-use these bytes to store the attached object
in `rb_classext_struct` without making it larger.
This commit is contained in:
Jean Boussier 2023-02-15 15:18:01 +01:00 committed by Jean Boussier
parent 1df75d6586
commit 1a4b4cd7f8
Notes: git 2023-02-16 07:15:11 +00:00
9 changed files with 152 additions and 121 deletions

View file

@ -523,7 +523,7 @@ hash_each(VALUE key, VALUE value, VALUE v)
#define SINGLETON_DUMP_UNABLE_P(klass) \
(rb_id_table_size(RCLASS_M_TBL(klass)) > 0 || \
rb_ivar_count(klass) > 1)
rb_ivar_count(klass) > 0)
static void
w_extended(VALUE klass, struct dump_arg *arg, int check)