summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 13:30:04 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commit7329b3339adab12092056bd8159513645d4f9e8a (patch)
tree0a9f5e23d07b47b4b459077ccb2c963dbac8dc41 /include
parent0c8592b9af304dfcac0d08ba96d5f22ad8312e1a (diff)
#define RB_BLOCK_CALL_FUNC_STRICT 1
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. Let's start from making rb_block_call_func_t strict, and apply RB_BLOCK_CALL_FUNC_ARGLIST liberally.
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 1bb4671c54..cf065e974e 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1949,16 +1949,12 @@ PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
COLDFUNC PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4);
+#define RB_BLOCK_CALL_FUNC_STRICT 1
#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg) \
VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
typedef VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg));
-
-#if defined RB_BLOCK_CALL_FUNC_STRICT && RB_BLOCK_CALL_FUNC_STRICT
typedef rb_block_call_func *rb_block_call_func_t;
-#else
-typedef VALUE (*rb_block_call_func_t)(ANYARGS);
-#endif
VALUE rb_each(VALUE);
VALUE rb_yield(VALUE);