From b2311c67671c69df8c390f22b3cb961f7be39a75 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 5 Apr 2019 08:41:04 +0000 Subject: [PATCH] `rb_add_method` is void function. * method.h (rb_add_method): make it void function because nobody use a return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- method.h | 2 +- vm_method.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/method.h b/method.h index 531acf72b8..65ea9dd0c2 100644 --- a/method.h +++ b/method.h @@ -188,8 +188,8 @@ typedef struct rb_method_definition_struct rb_method_definition_t; 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_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); diff --git a/vm_method.c b/vm_method.c index 8cb86263e2..c5ca644230 100644 --- a/vm_method.c +++ b/vm_method.c @@ -657,16 +657,14 @@ method_added(VALUE klass, ID mid) } } -rb_method_entry_t * +void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_visibility_t visi) { - rb_method_entry_t *me = rb_method_entry_make(klass, mid, klass, visi, type, NULL, mid, opts); + rb_method_entry_make(klass, mid, klass, visi, type, NULL, mid, opts); if (type != VM_METHOD_TYPE_UNDEF && type != VM_METHOD_TYPE_REFINED) { method_added(klass, mid); } - - return me; } MJIT_FUNC_EXPORTED void