diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-12 08:18:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-12 08:18:10 +0000 |
commit | a11e25432bf68d87528537b0717f6f13519622eb (patch) | |
tree | 900f68e4f28b4eb59dcc050848788825885364d9 /method.h | |
parent | 1abd51ad910ded964b5e6db984517974838f3850 (diff) | |
download | ruby-a11e25432bf68d87528537b0717f6f13519622eb.tar.gz |
method.h: UNDEFINED_REFINED_METHOD_P
* method.h (UNDEFINED_REFINED_METHOD_P): macro to tell if refined
original method is defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r-- | method.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -108,6 +108,9 @@ struct unlinked_method_entry_list_entry { }; #define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF) +#define UNDEFINED_REFINED_METHOD_P(def) \ + ((def)->type == VM_METHOD_TYPE_REFINED && \ + UNDEFINED_METHOD_ENTRY_P((def)->body.orig_me)) void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex); rb_method_entry_t *rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_flag_t noex); |