aboutsummaryrefslogtreecommitdiffstats
path: root/method.h
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-25 13:51:06 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-09-30 10:26:38 +0900
commit7cb96d41a52d5ce4b2485ff542edc88fa246bc1a (patch)
treedc13c02edcd942d8bf0aa67bbf1fd262cfcc0f41 /method.h
parent3207979278bea11c50cb84f4044047b9c503230b (diff)
downloadruby-7cb96d41a52d5ce4b2485ff542edc88fa246bc1a.tar.gz
refactor delete rb_method_entry_copy
The deleted function was to destructively overwrite existing method entries, which is now considered to be a bad idea. Delete it, and assign a newly created method entry instead.
Diffstat (limited to 'method.h')
-rw-r--r--method.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/method.h b/method.h
index 1ce5d4c96b..b46336b51e 100644
--- a/method.h
+++ b/method.h
@@ -185,6 +185,8 @@ 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);
@@ -221,7 +223,6 @@ void rb_sweep_method_entry(void *vm);
const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
-void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
void rb_scope_visibility_set(rb_method_visibility_t);