diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-05-09 08:58:07 +0200 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2025-05-09 10:22:51 +0200 |
| commit | ea772508470fbde15154c816b36fdf70f4c8735a (patch) | |
| tree | 8a58ba2e84b261fefa6b7138e22a3aca017ab512 /object.c | |
| parent | 0b81359b3f0df5b663b21562660877f8ef303e00 (diff) | |
Rename `RB_OBJ_SHAPE` -> `rb_obj_shape`
As well as `RB_OBJ_SHAPE_ID` -> `rb_obj_shape_id`
and `RSHAPE` is now a simple alias for `rb_shape_lookup`.
I tried to turn all these into `static inline` but I'm having
trouble with `RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;`
not being exposed as I'd expect.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13283
Diffstat (limited to 'object.c')
| -rw-r--r-- | object.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -132,7 +132,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(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)); @@ -335,7 +335,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj) return; } - rb_shape_t *src_shape = RB_OBJ_SHAPE(obj); + rb_shape_t *src_shape = rb_obj_shape(obj); if (rb_shape_too_complex_p(src_shape)) { // obj is TOO_COMPLEX so we can copy its iv_hash @@ -350,7 +350,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj) } rb_shape_t *shape_to_set_on_dest = src_shape; - rb_shape_t *initial_shape = RB_OBJ_SHAPE(dest); + rb_shape_t *initial_shape = rb_obj_shape(dest); if (initial_shape->heap_index != src_shape->heap_index || !rb_shape_canonical_p(src_shape)) { RUBY_ASSERT(initial_shape->type == SHAPE_T_OBJECT); |
