diff options
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 6c6e262f65..0c245c3d43 100644 --- a/internal.h +++ b/internal.h @@ -2389,6 +2389,8 @@ struct rb_call_data { }; RUBY_FUNC_EXPORTED RUBY_FUNC_NONNULL(1, VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*)); +RUBY_FUNC_EXPORTED +RUBY_FUNC_NONNULL(1, bool rb_method_basic_definition_p_with_cc(struct rb_call_data *, VALUE, ID)); #ifdef __GNUC__ # define rb_funcallv(recv, mid, argc, argv) \ @@ -2396,6 +2398,12 @@ RUBY_FUNC_NONNULL(1, VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, static struct rb_call_data rb_funcallv_data = { { 0, }, { 0, }, }; \ rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \ }) +# define rb_method_basic_definition_p(klass, mid) \ + __extension__({ \ + static struct rb_call_data rb_mbdp = { { 0, }, { 0, }, }; \ + (klass == Qfalse) ? /* hidden object cannot be overridden */ true : \ + rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); \ + }) #endif /* miniprelude.c, prelude.c */ |