From 05a4d176d640640a46f46a7d650add39b0e0789d Mon Sep 17 00:00:00 2001 From: glass Date: Fri, 8 Nov 2013 04:30:40 +0000 Subject: * 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 --- io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index d136d88192..2783a7a0d2 100644 --- a/io.c +++ b/io.c @@ -6186,7 +6186,7 @@ rb_io_s_popen(int argc, VALUE *argv, VALUE klass) } 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, convconfig_t *convconfig_p, mode_t *perm_p) { @@ -6208,7 +6208,7 @@ rb_scan_open_args(int argc, VALUE *argv, } static VALUE -rb_open_file(int argc, VALUE *argv, VALUE io) +rb_open_file(int argc, const VALUE *argv, VALUE io) { VALUE fname; int oflags, fmode; @@ -6479,7 +6479,7 @@ rb_io_open(VALUE filename, VALUE vmode, VALUE vperm, VALUE opt) } static VALUE -rb_io_open_with_args(int argc, VALUE *argv) +rb_io_open_with_args(int argc, const VALUE *argv) { 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); rb_ary_push(args, path); 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 */ return; } -- cgit v1.2.3