diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-29 07:55:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-29 07:55:11 +0000 |
commit | f0e73fc9862c8d2c57a89349fb79012b826b8245 (patch) | |
tree | b9019d2cb6547e8f0c8e5b992c0a05b814cd5be6 /include/ruby/ruby.h | |
parent | 32145ebfd6b69f833e7f5bddb6968a702499eb67 (diff) | |
download | ruby-f0e73fc9862c8d2c57a89349fb79012b826b8245.tar.gz |
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
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 8 |
1 files changed, 7 insertions, 1 deletions
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); |