mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor rb_obj_shape
out.
It still exists but only in `shape.c`.
This commit is contained in:
parent
97f44ac54e
commit
a80a5000ab
Notes:
git
2025-05-27 13:34:18 +00:00
5 changed files with 65 additions and 36 deletions
2
object.c
2
object.c
|
@ -128,7 +128,7 @@ rb_class_allocate_instance(VALUE klass)
|
|||
T_OBJECT | ROBJECT_EMBED | (RGENGC_WB_PROTECTED_OBJECT ? FL_WB_PROTECTED : 0), size, 0);
|
||||
VALUE obj = (VALUE)o;
|
||||
|
||||
RUBY_ASSERT(rb_obj_shape(obj)->type == SHAPE_ROOT);
|
||||
RUBY_ASSERT(RSHAPE_TYPE_P(RBASIC_SHAPE_ID(obj), SHAPE_ROOT));
|
||||
|
||||
RBASIC_SET_SHAPE_ID(obj, rb_shape_root(rb_gc_heap_id_for_size(size)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue