summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2024-07-10 02:33:14 +0200
committer卜部昌平 <shyouhei@ruby-lang.org>2024-07-10 12:15:35 +0900
commit1f15149e98796800f229f1bea7770d253fab5532 (patch)
tree0c0b42042f25d4d5722cb42e3810bb541d46f034
parentef2afe82eb1d085147b1c41f5acaf171ad9c96fe (diff)
rb_gc_obj_slot_size is banned in this file
Raison d'etre du gc_impl.c is to purge any internal constructs and rely solely on our public APIs. rb_gc_obj_slot_size is not public.
-rw-r--r--gc_impl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gc_impl.c b/gc_impl.c
index f3c0a40410..c9e24ab610 100644
--- a/gc_impl.c
+++ b/gc_impl.c
@@ -679,7 +679,8 @@ struct rvalue_overhead {
VALUE value; \
}; \
}))
-# define GET_RVALUE_OVERHEAD(obj) ((struct rvalue_overhead *)((uintptr_t)obj + rb_gc_obj_slot_size(obj)))
+size_t rb_gc_impl_obj_slot_size(VALUE obj);
+# define GET_RVALUE_OVERHEAD(obj) ((struct rvalue_overhead *)((uintptr_t)obj + rb_gc_impl_obj_slot_size(obj)))
#else
# define RVALUE_OVERHEAD 0
#endif