aboutsummaryrefslogtreecommitdiffstats
path: root/method.h
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-25 17:00:25 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-09-30 10:26:38 +0900
commit6c6a25feca8752205d81c5247f85d8ae8fb880d8 (patch)
tree449e41fc35b50b0d498f646303c49935d05b457b /method.h
parent167e6b48f1b321d671998728adf5a0db06d24445 (diff)
downloadruby-6c6a25feca8752205d81c5247f85d8ae8fb880d8.tar.gz
refactor add rb_method_entry_from_template
Tired of rb_method_entry_create(..., rb_method_definition_create( ..., &(rb_method_foo_t) {...})) maneuver. Provide a function that does the thing to reduce copy&paste.
Diffstat (limited to 'method.h')
-rw-r--r--method.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/method.h b/method.h
index b46336b51e..105e4b6a40 100644
--- a/method.h
+++ b/method.h
@@ -185,15 +185,14 @@ STATIC_ASSERT(sizeof_method_def, offsetof(rb_method_definition_t, body)==8);
((def)->type == VM_METHOD_TYPE_REFINED && \
UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
-const rb_method_definition_t *rb_method_definition_create(rb_method_type_t which, ID what, const void *how);
-
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_visibility_t visi);
void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi);
void rb_add_refined_method_entry(VALUE refined_class, ID mid);
void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi);
rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
-rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
+const rb_method_entry_t *rb_method_entry_from_template(const rb_method_entry_t *template, const void *opts);
+const rb_method_entry_t *rb_method_entry_for_missing(ID mid, VALUE klass);
const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);