ruby-changes:55287
From: nobu <ko1@a...>
Date: Wed, 10 Apr 2019 15:44:51 +0900 (JST)
Subject: [ruby-changes:55287] nobu:r67494 (trunk): vm_method.c: fix a warning
nobu 2019-04-10 15:44:42 +0900 (Wed, 10 Apr 2019) New Revision: 67494 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67494 Log: vm_method.c: fix a warning * vm_method.c (rb_add_method_iseq): use rb_method_iseq_t, as rb_method_definition_set refers, with a cast to suppress a warning. Modified files: trunk/vm_method.c Index: vm_method.c =================================================================== --- vm_method.c (revision 67493) +++ vm_method.c (revision 67494) @@ -670,13 +670,8 @@ rb_add_method(VALUE klass, ID mid, rb_me https://github.com/ruby/ruby/blob/trunk/vm_method.c#L670 MJIT_FUNC_EXPORTED void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi) { - struct { /* should be same fields with rb_method_iseq_struct */ - rb_iseq_t *iseqptr; - rb_cref_t *cref; - } iseq_body; + rb_method_iseq_t iseq_body = {(rb_iseq_t *)iseq, cref}; - iseq_body.iseqptr = iseq; - iseq_body.cref = cref; rb_add_method(klass, mid, VM_METHOD_TYPE_ISEQ, &iseq_body, visi); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/