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

ruby-changes:31500

From: glass <ko1@a...>
Date: Fri, 8 Nov 2013 11:00:46 +0900 (JST)
Subject: [ruby-changes:31500] glass:r43579 (trunk): * compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().

glass	2013-11-08 11:00:35 +0900 (Fri, 08 Nov 2013)

  New Revision: 43579

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

  Log:
    * compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().
    
    * compile.c (iseq_build_from_ary_body): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43578)
+++ ChangeLog	(revision 43579)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov  8 10:58:02 2013  Masaki Matsushita  <glass.saga@g...>
+
+	* compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().
+
+	* compile.c (iseq_build_from_ary_body): ditto.
+
 Fri Nov  8 10:49:34 2013  Masaki Matsushita  <glass.saga@g...>
 
 	* enumerator.c (append_method): use RARRAY_CONST_PTR().
Index: compile.c
===================================================================
--- compile.c	(revision 43578)
+++ compile.c	(revision 43579)
@@ -5578,7 +5578,8 @@ iseq_build_from_ary_exception(rb_iseq_t https://github.com/ruby/ruby/blob/trunk/compile.c#L5578
     int i;
 
     for (i=0; i<RARRAY_LEN(exception); i++) {
-	VALUE v, type, *ptr, eiseqval;
+	VALUE v, type, eiseqval;
+	const VALUE *ptr;
 	LABEL *lstart, *lend, *lcont;
 	int sp;
 
@@ -5587,7 +5588,7 @@ iseq_build_from_ary_exception(rb_iseq_t https://github.com/ruby/ruby/blob/trunk/compile.c#L5588
 	if (RARRAY_LEN(v) != 6) {
 	    rb_raise(rb_eSyntaxError, "wrong exception entry");
 	}
-	ptr  = RARRAY_PTR(v);
+	ptr  = RARRAY_CONST_PTR(v);
 	type = get_exception_sym2type(ptr[0]);
 	if (ptr[1] == Qnil) {
 	    eiseqval = 0;
@@ -5644,7 +5645,7 @@ iseq_build_from_ary_body(rb_iseq_t *iseq https://github.com/ruby/ruby/blob/trunk/compile.c#L5645
 		VALUE body, struct st_table *labels_table)
 {
     /* TODO: body should be frozen */
-    VALUE *ptr = RARRAY_PTR(body);
+    const VALUE *ptr = RARRAY_CONST_PTR(body);
     long i, len = RARRAY_LEN(body);
     int j;
     int line_no = 0;

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

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