mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
constify parameters
* include/ruby/intern.h: constify `argv` parameters. * include/ruby/ruby.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a1660e97f5
commit
e99ee55abc
23 changed files with 134 additions and 131 deletions
10
enumerator.c
10
enumerator.c
|
@ -267,7 +267,7 @@ enumerator_allocate(VALUE klass)
|
|||
}
|
||||
|
||||
static VALUE
|
||||
enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn, VALUE size)
|
||||
enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn, VALUE size)
|
||||
{
|
||||
struct enumerator *ptr;
|
||||
|
||||
|
@ -398,16 +398,16 @@ enumerator_init_copy(VALUE obj, VALUE orig)
|
|||
* For backwards compatibility; use rb_enumeratorize_with_size
|
||||
*/
|
||||
VALUE
|
||||
rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
|
||||
rb_enumeratorize(VALUE obj, VALUE meth, int argc, const VALUE *argv)
|
||||
{
|
||||
return rb_enumeratorize_with_size(obj, meth, argc, argv, 0);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
lazy_to_enum_i(VALUE self, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn);
|
||||
lazy_to_enum_i(VALUE self, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn);
|
||||
|
||||
VALUE
|
||||
rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn)
|
||||
rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, const 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 */
|
||||
|
@ -1459,7 +1459,7 @@ enumerable_lazy(VALUE obj)
|
|||
}
|
||||
|
||||
static VALUE
|
||||
lazy_to_enum_i(VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn)
|
||||
lazy_to_enum_i(VALUE obj, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn)
|
||||
{
|
||||
return enumerator_init(enumerator_allocate(rb_cLazy),
|
||||
obj, meth, argc, argv, size_fn, Qnil);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue