summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 14:22:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 14:22:23 +0000
commite5178a25501fc71c3a1d418f0be07776ebbfcdaf (patch)
tree966337d3c01db0c7cd3e6f19692945233354340c /enumerator.c
parent7b52f3a722c26fed7747cd383fb14662cbc84170 (diff)
enumerator.c: use rb_enumerator_size_func
* enumerator.c (rb_enumeratorize_with_size): use strict definition rb_enumerator_size_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/enumerator.c b/enumerator.c
index 0c45bf3..8eca0bf 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -266,7 +266,7 @@ enumerator_allocate(VALUE klass)
}
static VALUE
-enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, VALUE (*size_fn)(ANYARGS), VALUE size)
+enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn, VALUE size)
{
struct enumerator *ptr;
@@ -402,10 +402,10 @@ rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
}
static VALUE
-lazy_to_enum_i(VALUE self, VALUE meth, int argc, VALUE *argv, VALUE (*size_fn)(ANYARGS));
+lazy_to_enum_i(VALUE self, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn);
VALUE
-rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, VALUE *argv, VALUE (*size_fn)(ANYARGS))
+rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn)
{
/* Similar effect as calling obj.to_enum, i.e. dispatching to either
Kernel#to_enum vs Lazy#to_enum */
@@ -1355,7 +1355,7 @@ lazy_initialize(int argc, VALUE *argv, VALUE self)
}
static VALUE
-lazy_set_method(VALUE lazy, VALUE args, VALUE (*size_fn)(ANYARGS))
+lazy_set_method(VALUE lazy, VALUE args, rb_enumerator_size_func *size_fn)
{
ID id = rb_frame_this_func();
struct enumerator *e = enumerator_ptr(lazy);
@@ -1412,10 +1412,10 @@ enumerable_lazy(VALUE obj)
}
static VALUE
-lazy_to_enum_i(VALUE obj, VALUE meth, int argc, VALUE *argv, VALUE (*size_fn)(ANYARGS))
+lazy_to_enum_i(VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn)
{
return enumerator_init(enumerator_allocate(rb_cLazy),
- obj, meth, argc, argv, size_fn, Qnil);
+ obj, meth, argc, argv, size_fn, Qnil);
}
/*