diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-05 04:17:44 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-05 04:17:44 +0000 |
commit | 8427fca49bd85205f5a8766292dd893f003c0e48 (patch) | |
tree | f0047daa0f9466ac447f5ced1f231438f526992b /vm_core.h | |
parent | 779c18bf238aba630e40c26e10ce8aa278c45d61 (diff) | |
download | ruby-8427fca49bd85205f5a8766292dd893f003c0e48.tar.gz |
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
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; }; |