summaryrefslogtreecommitdiff
path: root/shape.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-06-12 13:55:05 +0200
committerJean Boussier <[email protected]>2025-06-12 17:08:22 +0200
commit0292b702c4296f7dde2a05a7a027c3395fbd0f78 (patch)
tree224379956d2c541d99e66dae64a76520b8c07904 /shape.c
parentd55c463d563800311d6dab23edeec16abd45068d (diff)
shape.h: make RSHAPE static inline
Since the shape_tree_ptr is `extern` it should be possible to fully inline `RSHAPE`.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13596
Diffstat (limited to 'shape.c')
-rw-r--r--shape.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/shape.c b/shape.c
index 352c8d97a7..eee1b08bba 100644
--- a/shape.c
+++ b/shape.c
@@ -383,10 +383,7 @@ rb_shape_each_shape_id(each_shape_callback callback, void *data)
RUBY_FUNC_EXPORTED rb_shape_t *
rb_shape_lookup(shape_id_t shape_id)
{
- uint32_t offset = (shape_id & SHAPE_ID_OFFSET_MASK);
- RUBY_ASSERT(offset != INVALID_SHAPE_ID);
-
- return &GET_SHAPE_TREE()->shape_list[offset];
+ return RSHAPE(shape_id);
}
RUBY_FUNC_EXPORTED shape_id_t