aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--io.c8
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 56fa8a4af1..14e3c5fe41 100644
--- a/ChangeLog
+++ b/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>
* dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
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;
}