diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-08-17 13:51:23 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-08-19 14:30:57 +0900 |
commit | 6649677eb93a101a5411a942ca1b84b541262537 (patch) | |
tree | 63c8e41c4bcb5ffed7782ca1651b3019796c5276 /object.c | |
parent | e2c2283a80843f6011a3d7665725ff0c5aed27c5 (diff) | |
download | ruby-6649677eb93a101a5411a942ca1b84b541262537.tar.gz |
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.
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) |