diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-09-23 17:42:27 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-09-30 10:26:38 +0900 |
commit | 595b3c4fddc5cde58add2fa2637acb2664694194 (patch) | |
tree | 6a77f258999c267804556506a7fef3751ed44af8 /proc.c | |
parent | 1521f7cf89fe3cf356a589c45bce4ccb57dce7fd (diff) | |
download | ruby-595b3c4fddc5cde58add2fa2637acb2664694194.tar.gz |
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.
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |