ruby-changes:31830
From: nobu <ko1@a...>
Date: Fri, 29 Nov 2013 16:55:18 +0900 (JST)
Subject: [ruby-changes:31830] nobu:r43909 (trunk): ruby/ruby.h: rb_block_call_func_t
nobu 2013-11-29 16:55:11 +0900 (Fri, 29 Nov 2013) New Revision: 43909 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43909 Log: 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. Modified files: trunk/include/ruby/ruby.h trunk/internal.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 43908) +++ include/ruby/ruby.h (revision 43909) @@ -1496,6 +1496,12 @@ PRINTF_ARGS(void rb_compile_warn(const c https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1496 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); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1510 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); Index: internal.h =================================================================== --- internal.h (revision 43908) +++ internal.h (revision 43909) @@ -751,7 +751,7 @@ void rb_print_backtrace(void); https://github.com/ruby/ruby/blob/trunk/internal.h#L751 /* vm_eval.c */ void Init_vm_eval(void); VALUE rb_current_realfilepath(void); -VALUE rb_check_block_call(VALUE, ID, int, VALUE *, VALUE (*)(ANYARGS), VALUE); +VALUE rb_check_block_call(VALUE, ID, int, VALUE *, rb_block_call_func_t, VALUE); typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE); VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/