[前][次][番号順一覧][スレッド一覧]

ruby-changes:29609

From: nobu <ko1@a...>
Date: Wed, 26 Jun 2013 23:22:36 +0900 (JST)
Subject: [ruby-changes:29609] nobu:r41661 (trunk): enumerator.c: use rb_enumerator_size_func

nobu	2013-06-26 23:22:23 +0900 (Wed, 26 Jun 2013)

  New Revision: 41661

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41661

  Log:
    enumerator.c: use rb_enumerator_size_func
    
    * enumerator.c (rb_enumeratorize_with_size): use strict definition
      rb_enumerator_size_func.

  Modified files:
    trunk/ChangeLog
    trunk/enumerator.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41660)
+++ ChangeLog	(revision 41661)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jun 26 23:22:21 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* enumerator.c (rb_enumeratorize_with_size): use strict definition
+	  rb_enumerator_size_func.
+
 Wed Jun 26 23:11:14 2013  Kouhei Sutou  <kou@c...>
 
 	* gc.c (is_before_sweep): Add a missing space before a parenthesis.
Index: enumerator.c
===================================================================
--- enumerator.c	(revision 41660)
+++ enumerator.c	(revision 41661)
@@ -266,7 +266,7 @@ enumerator_allocate(VALUE klass) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L266
 }
 
 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, https://github.com/ruby/ruby/blob/trunk/enumerator.c#L402
 }
 
 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, V https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1355
 }
 
 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) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1412
 }
 
 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);
 }
 
 /*

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]