From 5e2f227d219fe67c8c57aa32dafb61ac4591fb20 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 26 Jun 2013 13:43:22 +0000 Subject: 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 --- struct.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index dbfd406f72..5dc5e73ae8 100644 --- a/struct.c +++ b/struct.c @@ -460,6 +460,12 @@ rb_struct_new(VALUE klass, ...) static VALUE rb_struct_size(VALUE s); +static VALUE +struct_enum_size(VALUE s, VALUE args, VALUE eobj) +{ + return rb_struct_size(s); +} + /* * call-seq: * struct.each {|obj| block } -> struct @@ -484,7 +490,7 @@ rb_struct_each(VALUE s) { long i; - RETURN_SIZED_ENUMERATOR(s, 0, 0, rb_struct_size); + RETURN_SIZED_ENUMERATOR(s, 0, 0, struct_enum_size); for (i=0; i