mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_open_with_args): use RARRAY_CONST_PTR().
* io.c (rb_scan_open_args): use const qualifier for above. * io.c (rb_open_file): ditto. * io.c (rb_io_open_with_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5c54eb4045
commit
05a4d176d6
2 changed files with 14 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Fri Nov 8 13:19:26 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||||
|
|
||||||
|
* io.c (rb_io_open_with_args): use RARRAY_CONST_PTR().
|
||||||
|
|
||||||
|
* io.c (rb_scan_open_args): use const qualifier for above.
|
||||||
|
|
||||||
|
* io.c (rb_open_file): ditto.
|
||||||
|
|
||||||
|
* io.c (rb_io_open_with_args): ditto.
|
||||||
|
|
||||||
Fri Nov 8 11:35:06 2013 Masaki Matsushita <glass.saga@gmail.com>
|
Fri Nov 8 11:35:06 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||||
|
|
||||||
* dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
|
* dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
|
||||||
|
|
8
io.c
8
io.c
|
@ -6186,7 +6186,7 @@ rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rb_scan_open_args(int argc, VALUE *argv,
|
rb_scan_open_args(int argc, const VALUE *argv,
|
||||||
VALUE *fname_p, int *oflags_p, int *fmode_p,
|
VALUE *fname_p, int *oflags_p, int *fmode_p,
|
||||||
convconfig_t *convconfig_p, mode_t *perm_p)
|
convconfig_t *convconfig_p, mode_t *perm_p)
|
||||||
{
|
{
|
||||||
|
@ -6208,7 +6208,7 @@ rb_scan_open_args(int argc, VALUE *argv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_open_file(int argc, VALUE *argv, VALUE io)
|
rb_open_file(int argc, const VALUE *argv, VALUE io)
|
||||||
{
|
{
|
||||||
VALUE fname;
|
VALUE fname;
|
||||||
int oflags, fmode;
|
int oflags, fmode;
|
||||||
|
@ -6479,7 +6479,7 @@ rb_io_open(VALUE filename, VALUE vmode, VALUE vperm, VALUE opt)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_io_open_with_args(int argc, VALUE *argv)
|
rb_io_open_with_args(int argc, const VALUE *argv)
|
||||||
{
|
{
|
||||||
VALUE io;
|
VALUE io;
|
||||||
|
|
||||||
|
@ -9463,7 +9463,7 @@ open_key_args(int argc, VALUE *argv, VALUE opt, struct foreach_arg *arg)
|
||||||
args = rb_ary_tmp_new(n);
|
args = rb_ary_tmp_new(n);
|
||||||
rb_ary_push(args, path);
|
rb_ary_push(args, path);
|
||||||
rb_ary_concat(args, v);
|
rb_ary_concat(args, v);
|
||||||
arg->io = rb_io_open_with_args((int)n, RARRAY_PTR(args));
|
arg->io = rb_io_open_with_args((int)n, RARRAY_CONST_PTR(args));
|
||||||
rb_ary_clear(args); /* prevent from GC */
|
rb_ary_clear(args); /* prevent from GC */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue