mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
intern.h: rb_enumeratorize_with_size with cast
* include/ruby/intern.h (rb_enumeratorize_with_size): cast for backward compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5e2f227d21
commit
7cc4b8097c
2 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
|||
Wed Jun 26 22:43:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Jun 26 22:44:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/intern.h (rb_enumeratorize_with_size): cast for
|
||||
backward compatibility.
|
||||
|
||||
* include/ruby/intern.h (rb_enumerator_size_func): define strict
|
||||
function declaration for rb_enumeratorize_with_size().
|
||||
|
|
|
@ -200,6 +200,10 @@ VALUE rb_enum_values_pack(int, VALUE*);
|
|||
VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *);
|
||||
typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
|
||||
VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, VALUE *, rb_enumerator_size_func *);
|
||||
#ifndef RUBY_EXPORT
|
||||
#define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
|
||||
rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
|
||||
#endif
|
||||
#define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
|
||||
if (!rb_block_given_p()) \
|
||||
return rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()),\
|
||||
|
|
Loading…
Reference in a new issue