mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enumerator.c (enumerator_mark, enumerator_iter_i, enumerator_each_i,
enumerator_allocate): add prototype. * enumerator.c (enumerator_each_i): declare unused two arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
60dde833c3
commit
4f56ca8218
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Mon Apr 14 14:16:08 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* enumerator.c (enumerator_mark, enumerator_iter_i, enumerator_each_i,
|
||||||
|
enumerator_allocate): add prototype.
|
||||||
|
|
||||||
|
* enumerator.c (enumerator_each_i): declare unused two arguments.
|
||||||
|
|
||||||
Mon Apr 14 13:58:32 2008 Akinori MUSHA <knu@iDaemons.org>
|
Mon Apr 14 13:58:32 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* string.c (rb_str_each_char): New methods: String#chars and
|
* string.c (rb_str_each_char): New methods: String#chars and
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct enumerator {
|
||||||
rb_block_call_func *iter;
|
rb_block_call_func *iter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void enumerator_mark _((void *));
|
||||||
static void
|
static void
|
||||||
enumerator_mark(p)
|
enumerator_mark(p)
|
||||||
void *p;
|
void *p;
|
||||||
|
@ -71,6 +72,7 @@ enumerator_ptr(obj)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VALUE enumerator_iter_i _((VALUE, VALUE, int, VALUE *));
|
||||||
static VALUE
|
static VALUE
|
||||||
enumerator_iter_i(i, enum_obj, argc, argv)
|
enumerator_iter_i(i, enum_obj, argc, argv)
|
||||||
VALUE i;
|
VALUE i;
|
||||||
|
@ -226,6 +228,7 @@ enum_each_cons(obj, n)
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VALUE enumerator_allocate _((VALUE));
|
||||||
static VALUE
|
static VALUE
|
||||||
enumerator_allocate(klass)
|
enumerator_allocate(klass)
|
||||||
VALUE klass;
|
VALUE klass;
|
||||||
|
@ -235,10 +238,13 @@ enumerator_allocate(klass)
|
||||||
enumerator_mark, -1, ptr);
|
enumerator_mark, -1, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VALUE enumerator_each_i _((VALUE, VALUE, int, VALUE *));
|
||||||
static VALUE
|
static VALUE
|
||||||
enumerator_each_i(v, enum_obj)
|
enumerator_each_i(v, enum_obj, argc, argv)
|
||||||
VALUE v;
|
VALUE v;
|
||||||
VALUE enum_obj;
|
VALUE enum_obj;
|
||||||
|
int argc;
|
||||||
|
VALUE *argv;
|
||||||
{
|
{
|
||||||
return rb_yield(v);
|
return rb_yield(v);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue