insns.def: avoid type-punned pointer cast

* insns.def (once), vm_insnhelper.c (vm_once_exec): turn the
  parameter into a VALUE to get rid of type-punned pointer cast.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-06-20 06:59:28 +00:00
parent 90a9db6e6c
commit 7d9b37cc53
2 changed files with 3 additions and 3 deletions

View File

@ -1250,7 +1250,7 @@ once
} }
else if (is->once.running_thread == th) { else if (is->once.running_thread == th) {
/* recursive once */ /* recursive once */
val = vm_once_exec(iseq); val = vm_once_exec((VALUE)iseq);
} }
else { else {
/* waiting for finish */ /* waiting for finish */

View File

@ -2397,9 +2397,9 @@ vm_make_proc_with_iseq(rb_iseq_t *blockiseq)
} }
static VALUE static VALUE
vm_once_exec(rb_iseq_t *iseq) vm_once_exec(VALUE iseq)
{ {
VALUE proc = vm_make_proc_with_iseq(iseq); VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
return rb_proc_call_with_block(proc, 0, 0, Qnil); return rb_proc_call_with_block(proc, 0, 0, Qnil);
} }