mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor FIRST_T_OBJECT_SHAPE_ID
to not be used outside shape.c
This commit is contained in:
parent
e2f5e233b5
commit
3135eddb4e
Notes:
git
2025-05-09 18:46:01 +00:00
4 changed files with 9 additions and 3 deletions
2
object.c
2
object.c
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue