From 8427fca49bd85205f5a8766292dd893f003c0e48 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Mon, 5 Feb 2018 04:17:44 +0000 Subject: assigning void* to a function pointer is a POSIXism No implicit cast is defined between these types. Should be explicit. Also, NULL is defined to be ((void*)0) so not usable as a function pointer value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index c39bcad643..b7eebf0061 100644 --- a/vm_core.h +++ b/vm_core.h @@ -292,8 +292,9 @@ pathobj_realpath(VALUE pathobj) } } -/* A forward declaration */ +/* Forward declarations */ struct rb_mjit_unit; +struct rb_execution_context_struct; struct rb_iseq_constant_body { enum iseq_type { @@ -419,7 +420,8 @@ struct rb_iseq_constant_body { unsigned int stack_max; /* for stack overflow check */ /* The following fields are MJIT related info. */ - void *jit_func; /* function pointer for loaded native code */ + VALUE (*jit_func)(struct rb_execution_context_struct *, + struct rb_control_frame_struct *); /* function pointer for loaded native code */ long unsigned total_calls; /* number of total calls with `mjit_exec()` */ struct rb_mjit_unit *jit_unit; }; -- cgit v1.2.3