[前][次][番号順一覧][スレッド一覧]

ruby-changes:31502

From: glass <ko1@a...>
Date: Fri, 8 Nov 2013 13:30:48 +0900 (JST)
Subject: [ruby-changes:31502] glass:r43581 (trunk): * io.c (rb_io_open_with_args): use RARRAY_CONST_PTR().

glass	2013-11-08 13:30:40 +0900 (Fri, 08 Nov 2013)

  New Revision: 43581

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43581

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/io.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43580)
+++ ChangeLog	(revision 43581)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov  8 13:19:26 2013  Masaki Matsushita  <glass.saga@g...>
+
+	* 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@g...>
 
 	* dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
Index: io.c
===================================================================
--- io.c	(revision 43580)
+++ io.c	(revision 43581)
@@ -6186,7 +6186,7 @@ rb_io_s_popen(int argc, VALUE *argv, VAL https://github.com/ruby/ruby/blob/trunk/io.c#L6186
 }
 
 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, https://github.com/ruby/ruby/blob/trunk/io.c#L6208
 }
 
 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, https://github.com/ruby/ruby/blob/trunk/io.c#L6479
 }
 
 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, VAL https://github.com/ruby/ruby/blob/trunk/io.c#L9463
 	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;
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]