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

ruby-changes:39230

From: ko1 <ko1@a...>
Date: Tue, 21 Jul 2015 19:47:59 +0900 (JST)
Subject: [ruby-changes:39230] ko1:r51311 (trunk): * compile.c: constify the first parameter (iseq).

ko1	2015-07-21 19:47:45 +0900 (Tue, 21 Jul 2015)

  New Revision: 51311

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

  Log:
    * compile.c: constify the first parameter (iseq).
      * iseq_add_mark_object()
      * iseq_add_mark_object_compile_time()
    * iseq.c, iseq.h (rb_iseq_add_mark_object): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/iseq.c
    trunk/iseq.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51310)
+++ ChangeLog	(revision 51311)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jul 21 19:43:20 2015  Koichi Sasada  <ko1@a...>
+
+	* compile.c: constify the first parameter (iseq).
+	  * iseq_add_mark_object()
+	  * iseq_add_mark_object_compile_time()
+
+	* iseq.c, iseq.h (rb_iseq_add_mark_object): ditto.
+
 Tue Jul 21 16:18:48 2015  Eric Wong  <e@8...>
 
 	* test/socket/test_nonblock.rb: increase buffer sizes
Index: iseq.c
===================================================================
--- iseq.c	(revision 51310)
+++ iseq.c	(revision 51311)
@@ -229,7 +229,7 @@ set_relation(rb_iseq_t *iseq, const VALU https://github.com/ruby/ruby/blob/trunk/iseq.c#L229
 }
 
 void
-rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj)
+rb_iseq_add_mark_object(const rb_iseq_t *iseq, VALUE obj)
 {
     if (!RTEST(iseq->mark_ary)) {
 	RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, rb_ary_tmp_new(3));
Index: iseq.h
===================================================================
--- iseq.h	(revision 51310)
+++ iseq.h	(revision 51311)
@@ -23,7 +23,7 @@ VALUE rb_iseq_build_from_ary(rb_iseq_t * https://github.com/ruby/ruby/blob/trunk/iseq.h#L23
 			     VALUE exception, VALUE body);
 
 /* iseq.c */
-void rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj);
+void rb_iseq_add_mark_object(const rb_iseq_t *iseq, VALUE obj);
 VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
 VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
 struct st_table *ruby_insn_make_insn_table(void);
Index: compile.c
===================================================================
--- compile.c	(revision 51310)
+++ compile.c	(revision 51311)
@@ -422,7 +422,7 @@ APPEND_ELEM(ISEQ_ARG_DECLARE LINK_ANCHOR https://github.com/ruby/ruby/blob/trunk/compile.c#L422
 #endif
 
 static int
-iseq_add_mark_object(rb_iseq_t *iseq, VALUE v)
+iseq_add_mark_object(const rb_iseq_t *iseq, VALUE v)
 {
     if (!SPECIAL_CONST_P(v)) {
 	rb_iseq_add_mark_object(iseq, v);
@@ -433,7 +433,7 @@ iseq_add_mark_object(rb_iseq_t *iseq, VA https://github.com/ruby/ruby/blob/trunk/compile.c#L433
 #define ruby_sourcefile		RSTRING_PTR(iseq->location.path)
 
 static int
-iseq_add_mark_object_compile_time(rb_iseq_t *iseq, VALUE v)
+iseq_add_mark_object_compile_time(const rb_iseq_t *iseq, VALUE v)
 {
     if (!SPECIAL_CONST_P(v)) {
 	rb_ary_push(iseq->compile_data->mark_ary, v);

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

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