From f0e73fc9862c8d2c57a89349fb79012b826b8245 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 29 Nov 2013 07:55:11 +0000 Subject: ruby/ruby.h: rb_block_call_func_t * include/ruby/ruby.h (rb_block_call_func_t): strict check for rb_block_call_func* if RB_BLOCK_CALL_FUNC_STRICT is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 5496213500..f2f65b9232 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1496,6 +1496,12 @@ PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4); typedef VALUE rb_block_call_func(VALUE, VALUE, int, VALUE*, VALUE); #define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1 +#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); VALUE rb_yield_values(int n, ...); @@ -1504,7 +1510,7 @@ VALUE rb_yield_splat(VALUE); int rb_block_given_p(void); void rb_need_block(void); VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE); -VALUE rb_block_call(VALUE,ID,int,VALUE*,VALUE(*)(ANYARGS),VALUE); +VALUE rb_block_call(VALUE,ID,int,VALUE*,rb_block_call_func_t,VALUE); VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE); VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...); VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE); -- cgit v1.2.3