summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 13:43:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 13:43:22 +0000
commit5e2f227d219fe67c8c57aa32dafb61ac4591fb20 (patch)
tree962aafa0b26bda66d9227acfb8775a848308fac5 /enum.c
parent26646186afbf474c75a3606a1c492fbc74575c2b (diff)
intern.h: define rb_enumerator_size_func
* include/ruby/intern.h (rb_enumerator_size_func): define strict function declaration for rb_enumeratorize_with_size(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/enum.c b/enum.c
index 2b9340f..a3cefe7 100644
--- a/enum.c
+++ b/enum.c
@@ -312,7 +312,7 @@ find_all_i(VALUE i, VALUE ary, int argc, VALUE *argv)
}
static VALUE
-enum_size(VALUE self, VALUE args)
+enum_size(VALUE self, VALUE args, VALUE eobj)
{
VALUE r;
r = rb_check_funcall(self, id_size, 0, 0);
@@ -1795,13 +1795,13 @@ each_slice_i(VALUE i, VALUE m, int argc, VALUE *argv)
}
static VALUE
-enum_each_slice_size(VALUE obj, VALUE args)
+enum_each_slice_size(VALUE obj, VALUE args, VALUE eobj)
{
VALUE n, size;
long slice_size = NUM2LONG(RARRAY_AREF(args, 0));
if (slice_size <= 0) rb_raise(rb_eArgError, "invalid slice size");
- size = enum_size(obj, 0);
+ size = enum_size(obj, 0, 0);
if (size == Qnil) return Qnil;
n = rb_funcall(size, '+', 1, LONG2NUM(slice_size-1));
@@ -1862,13 +1862,13 @@ each_cons_i(VALUE i, VALUE args, int argc, VALUE *argv)
}
static VALUE
-enum_each_cons_size(VALUE obj, VALUE args)
+enum_each_cons_size(VALUE obj, VALUE args, VALUE eobj)
{
VALUE n, size;
long cons_size = NUM2LONG(RARRAY_AREF(args, 0));
if (cons_size <= 0) rb_raise(rb_eArgError, "invalid size");
- size = enum_size(obj, 0);
+ size = enum_size(obj, 0, 0);
if (size == Qnil) return Qnil;
n = rb_funcall(size, '+', 1, LONG2NUM(1 - cons_size));
@@ -2251,11 +2251,11 @@ cycle_i(VALUE i, VALUE ary, int argc, VALUE *argv)
}
static VALUE
-enum_cycle_size(VALUE self, VALUE args)
+enum_cycle_size(VALUE self, VALUE args, VALUE eobj)
{
long mul;
VALUE n = Qnil;
- VALUE size = enum_size(self, args);
+ VALUE size = enum_size(self, args, 0);
if (size == Qnil) return Qnil;