From 6649677eb93a101a5411a942ca1b84b541262537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Mon, 17 Aug 2020 13:51:23 +0900 Subject: ROBJECT_IV_INDEX_TBL: convert into an inline function Former ROBJECT_IV_INDEX_TBL macro included RCLASS_IV_INDEX_TBL, which is not disclosed to extension libraies. The macro was kind of broken. Why not just deprecate it, and convert the internal use into an inline function. --- object.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'object.c') diff --git a/object.c b/object.c index 9fb14817cd..08fec850d3 100644 --- a/object.c +++ b/object.c @@ -320,6 +320,14 @@ rb_obj_singleton_class(VALUE obj) return rb_singleton_class(obj); } +struct st_table * +rb_obj_iv_index_tbl(const struct RObject *obj) +{ + /* This is a function that practically never gets used. Just to keep + * backwards compatibility to ruby 2.x. */ + return ROBJECT_IV_INDEX_TBL((VALUE)obj); +} + /*! \private */ MJIT_FUNC_EXPORTED void rb_obj_copy_ivar(VALUE dest, VALUE obj) -- cgit v1.2.3