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

ruby-changes:52775

From: ko1 <ko1@a...>
Date: Wed, 10 Oct 2018 13:20:23 +0900 (JST)
Subject: [ruby-changes:52775] ko1:r64987 (trunk): revisit `RARRAY_PTR()`.

ko1	2018-10-10 13:20:17 +0900 (Wed, 10 Oct 2018)

  New Revision: 64987

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64987

  Log:
    revisit `RARRAY_PTR()`.
    
    * process.c (check_exec_redirect): use RARRAY_AREF() instead of
      using RARRAY_PTR().

  Modified files:
    trunk/process.c
Index: process.c
===================================================================
--- process.c	(revision 64986)
+++ process.c	(revision 64987)
@@ -1899,7 +1899,7 @@ check_exec_redirect(VALUE key, VALUE val https://github.com/ruby/ruby/blob/trunk/process.c#L1899
         else if (RB_TYPE_P(key, T_ARRAY)) {
 	    int i;
 	    for (i = 0; i < RARRAY_LEN(key); i++) {
-		VALUE v = RARRAY_PTR(key)[i];
+		VALUE v = RARRAY_AREF(key, i);
 		VALUE fd = check_exec_redirect_fd(v, 1);
 		if (FIX2INT(fd) != 1 && FIX2INT(fd) != 2) break;
 	    }

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

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