ruby-changes:37819
From: nobu <ko1@a...>
Date: Mon, 9 Mar 2015 08:20:25 +0900 (JST)
Subject: [ruby-changes:37819] nobu:r49900 (trunk): proc.c, vm.c: fix implicit conversions
nobu 2015-03-09 08:20:13 +0900 (Mon, 09 Mar 2015) New Revision: 49900 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49900 Log: proc.c, vm.c: fix implicit conversions * proc.c (rb_mod_define_method): fix implicit conversion of visibility type. erred by -Werror=shorten-64-to-32. * vm.c (vm_define_method): ditto. Modified files: trunk/proc.c trunk/vm.c Index: proc.c =================================================================== --- proc.c (revision 49899) +++ proc.c (revision 49900) @@ -1638,11 +1638,11 @@ rb_mod_define_method(int argc, VALUE *ar https://github.com/ruby/ruby/blob/trunk/proc.c#L1638 { ID id; VALUE body; - int noex = NOEX_PUBLIC; + rb_method_flag_t noex = NOEX_PUBLIC; const rb_cref_t *cref = rb_vm_cref_in_context(mod, mod); if (cref) { - noex = CREF_VISI(cref); + noex = (rb_method_flag_t)CREF_VISI(cref); } if (argc == 1) { Index: vm.c =================================================================== --- vm.c (revision 49899) +++ vm.c (revision 49900) @@ -2267,7 +2267,7 @@ vm_define_method(rb_thread_t *th, VALUE https://github.com/ruby/ruby/blob/trunk/vm.c#L2267 rb_num_t is_singleton, rb_cref_t *cref) { VALUE klass = CREF_CLASS(cref); - int noex = CREF_VISI(cref); + rb_method_flag_t noex = (rb_method_flag_t)CREF_VISI(cref); rb_iseq_t *miseq; GetISeqPtr(iseqval, miseq); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/