summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 14:25:53 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commitb8fd2e83e7b18fe3c70fc342388b1cb054b22e42 (patch)
treeede1f096b9a970a831f036323915b1b76f40aa17 /internal.h
parent7329b3339adab12092056bd8159513645d4f9e8a (diff)
decouple compile.c usage of imemo_ifunc
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from struct vm_ifunc, but in doing so we also have to decouple the usage of this struct in compile.c, which (I think) is an abuse of ANYARGS.
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal.h b/internal.h
index d6b762aeeb..01009b616a 100644
--- a/internal.h
+++ b/internal.h
@@ -1181,15 +1181,15 @@ struct vm_ifunc_argc {
struct vm_ifunc {
VALUE flags;
VALUE reserved;
- VALUE (*func)(ANYARGS);
+ rb_block_call_func_t func;
const void *data;
struct vm_ifunc_argc argc;
};
#define IFUNC_NEW(a, b, c) ((struct vm_ifunc *)rb_imemo_new(imemo_ifunc, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
-struct vm_ifunc *rb_vm_ifunc_new(VALUE (*func)(ANYARGS), const void *data, int min_argc, int max_argc);
+struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
static inline struct vm_ifunc *
-rb_vm_ifunc_proc_new(VALUE (*func)(ANYARGS), const void *data)
+rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
{
return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS);
}