summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2025-05-09 08:58:07 +0200
committerJean Boussier <jean.boussier@gmail.com>2025-05-09 10:22:51 +0200
commitea772508470fbde15154c816b36fdf70f4c8735a (patch)
tree8a58ba2e84b261fefa6b7138e22a3aca017ab512 /gc.c
parent0b81359b3f0df5b663b21562660877f8ef303e00 (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 'gc.c')
-rw-r--r--gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index 1b0a911b90..4bff60b743 100644
--- a/gc.c
+++ b/gc.c
@@ -367,7 +367,7 @@ rb_gc_shutdown_call_finalizer_p(VALUE obj)
uint32_t
rb_gc_get_shape(VALUE obj)
{
- return (uint32_t)RB_OBJ_SHAPE_ID(obj);
+ return (uint32_t)rb_obj_shape_id(obj);
}
void
@@ -379,7 +379,7 @@ rb_gc_set_shape(VALUE obj, uint32_t shape_id)
uint32_t
rb_gc_rebuild_shape(VALUE obj, size_t heap_id)
{
- shape_id_t orig_shape_id = RB_OBJ_SHAPE_ID(obj);
+ shape_id_t orig_shape_id = rb_obj_shape_id(obj);
if (rb_shape_id_too_complex_p(orig_shape_id)) {
return (uint32_t)orig_shape_id;
}
@@ -1815,7 +1815,7 @@ static VALUE
object_id(VALUE obj)
{
VALUE id = Qfalse;
- rb_shape_t *shape = RB_OBJ_SHAPE(obj);
+ rb_shape_t *shape = rb_obj_shape(obj);
unsigned int lock_lev;
// We could avoid locking if the object isn't shareable