Refactor FIRST_T_OBJECT_SHAPE_ID to not be used outside shape.c

This commit is contained in:
Jean Boussier 2025-05-09 12:02:48 +02:00
parent e2f5e233b5
commit 3135eddb4e
Notes: git 2025-05-09 18:46:01 +00:00
4 changed files with 9 additions and 3 deletions

View file

@ -135,7 +135,7 @@ rb_class_allocate_instance(VALUE klass)
RUBY_ASSERT(rb_obj_shape(obj)->type == SHAPE_ROOT);
// Set the shape to the specific T_OBJECT shape.
ROBJECT_SET_SHAPE_ID(obj, (shape_id_t)(rb_gc_heap_id_for_size(size) + FIRST_T_OBJECT_SHAPE_ID));
ROBJECT_SET_SHAPE_ID(obj, rb_shape_root(rb_gc_heap_id_for_size(size)));
#if RUBY_DEBUG
RUBY_ASSERT(!rb_shape_obj_too_complex_p(obj));