summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2025-06-11 14:32:35 +0200
committerJean Boussier <jean.boussier@gmail.com>2025-06-11 16:38:38 +0200
commit95201299fd7bf0918dfbd8c127ce2b5b33ffa537 (patch)
treeb6659cd0932fa3f0cb71c8cf8c2aba382d86cf6b /object.c
parent4463ac264dc44979ea74bbca3de58ae72d5eea71 (diff)
Refactor the last references to `rb_shape_t`
The type isn't opaque because Ruby isn't often compiled with LTO, so for optimization purpose it's better to allow as much inlining as possible. However ideally only `shape.c` and `shape.h` should deal with the actual struct, and everything else should just deal with opaque `shape_id_t`.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13586
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 8e924b4e6a..a4da42d12f 100644
--- a/object.c
+++ b/object.c
@@ -340,7 +340,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
shape_id_t dest_shape_id = src_shape_id;
shape_id_t initial_shape_id = RBASIC_SHAPE_ID(dest);
- RUBY_ASSERT(RSHAPE(initial_shape_id)->type == SHAPE_ROOT);
+ RUBY_ASSERT(RSHAPE_TYPE_P(initial_shape_id, SHAPE_ROOT));
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);
if (UNLIKELY(rb_shape_too_complex_p(dest_shape_id))) {