Skip to content

Commit

Permalink
ruby/ruby.h: rb_block_call_func_t
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Nov 29, 2013
1 parent 32145eb commit f0e73fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion include/ruby/ruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ void rb_print_backtrace(void);
/* 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);
Expand Down

0 comments on commit f0e73fc

Please sign in to comment.