summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Gruber <luke.gruber@shopify.com>2025-12-01 12:55:39 -0500
committerGitHub <noreply@github.com>2025-12-01 12:55:39 -0500
commite02eda194f1d1ff6998b5eb462dd2a2afc54281c (patch)
tree6b675f454d1693607bf969fe99ebb664021cf251
parentc58970b57a91a10eb75f933258643d0393ce0ba8 (diff)
Speedup RBASIC_FIELDS_COUNT (#15273)
We know the argument is not a class, module or special const, so we can skip these checks.
-rw-r--r--shape.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/shape.h b/shape.h
index ec5c25b32f..d9cfe48759 100644
--- a/shape.h
+++ b/shape.h
@@ -395,7 +395,7 @@ ROBJECT_FIELDS_COUNT(VALUE obj)
static inline uint32_t
RBASIC_FIELDS_COUNT(VALUE obj)
{
- return RSHAPE(rb_obj_shape_id(obj))->next_field_index;
+ return RSHAPE(RBASIC_SHAPE_ID(obj))->next_field_index;
}
static inline bool