From 595b3c4fddc5cde58add2fa2637acb2664694194 Mon Sep 17 00:00:00 2001 From: 卜部昌平 Date: Mon, 23 Sep 2019 17:42:27 +0900 Subject: refactor rb_method_definition_create take opts Before this changeset rb_method_definition_create only allocated a memory region and we had to destructively initialize it later. That is not a good design so we change the API to return a complete struct instead. --- proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 496baa41f1..465135d505 100644 --- a/proc.c +++ b/proc.c @@ -15,7 +15,7 @@ #include "vm_core.h" #include "iseq.h" -extern const rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid); +extern const rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid, const void *opts); /* Proc.new with no block will raise an exception in the future * versions */ @@ -1482,7 +1482,7 @@ mnew_missing(VALUE klass, VALUE obj, ID id, VALUE mclass) RB_OBJ_WRITE(method, &data->recv, obj); RB_OBJ_WRITE(method, &data->klass, klass); - def = rb_method_definition_create(VM_METHOD_TYPE_MISSING, id); + def = rb_method_definition_create(VM_METHOD_TYPE_MISSING, id, NULL); me = rb_method_entry_create(id, klass, METHOD_VISI_UNDEF, def); RB_OBJ_WRITE(method, &data->me, me); -- cgit v1.2.3