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

ruby-changes:32220

From: ko1 <ko1@a...>
Date: Fri, 20 Dec 2013 17:08:10 +0900 (JST)
Subject: [ruby-changes:32220] ko1:r44299 (trunk): * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into

ko1	2013-12-20 17:07:47 +0900 (Fri, 20 Dec 2013)

  New Revision: 44299

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

  Log:
    * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
      RB_OBJ_WRITE and RB_OBJ_WRITTEN.
    * array.c, class.c, compile.c, hash.c, internal.h, iseq.c,
      proc.c, process.c, re.c, string.c, variable.c, vm.c,
      vm_eval.c, vm_insnhelper.c, vm_insnhelper.h,
      vm_method.c: catch up this change.

  Modified files:
    trunk/ChangeLog
    trunk/array.c
    trunk/class.c
    trunk/compile.c
    trunk/hash.c
    trunk/include/ruby/ruby.h
    trunk/internal.h
    trunk/iseq.c
    trunk/proc.c
    trunk/process.c
    trunk/re.c
    trunk/string.c
    trunk/variable.c
    trunk/vm.c
    trunk/vm_eval.c
    trunk/vm_insnhelper.c
    trunk/vm_insnhelper.h
    trunk/vm_method.c
Index: array.c
===================================================================
--- array.c	(revision 44298)
+++ array.c	(revision 44299)
@@ -60,7 +60,7 @@ ary_memfill(VALUE ary, long beg, long si https://github.com/ruby/ruby/blob/trunk/array.c#L60
 {
     RARRAY_PTR_USE(ary, ptr, {
 	memfill(ptr + beg, size, val);
-	OBJ_WRITTEN(ary, Qundef, val);
+	RB_OBJ_WRITTEN(ary, Qundef, val);
     });
 }
 
@@ -79,7 +79,7 @@ ary_memcpy(VALUE ary, long beg, long arg https://github.com/ruby/ruby/blob/trunk/array.c#L79
 	    int i;
 	    RARRAY_PTR_USE(ary, ptr, {
 		for (i=0; i<argc; i++) {
-		    OBJ_WRITE(ary, &ptr[i+beg], argv[i]);
+		    RB_OBJ_WRITE(ary, &ptr[i+beg], argv[i]);
 		}
 	    });
 	}
@@ -179,7 +179,7 @@ ary_memcpy(VALUE ary, long beg, long arg https://github.com/ruby/ruby/blob/trunk/array.c#L179
     assert(!ARY_EMBED_P(_ary_)); \
     assert(ARY_SHARED_P(_ary_)); \
     assert(ARY_SHARED_ROOT_P(_value_)); \
-    OBJ_WRITE(_ary_, &RARRAY(_ary_)->as.heap.aux.shared, _value_); \
+    RB_OBJ_WRITE(_ary_, &RARRAY(_ary_)->as.heap.aux.shared, _value_); \
 } while (0)
 #define RARRAY_SHARED_ROOT_FLAG FL_USER5
 #define ARY_SHARED_ROOT_P(ary) (FL_TEST((ary), RARRAY_SHARED_ROOT_FLAG))
@@ -4063,7 +4063,7 @@ rb_ary_or(VALUE ary1, VALUE ary2) https://github.com/ruby/ruby/blob/trunk/array.c#L4063
     for (i=0; i<RARRAY_LEN(ary2); i++) {
 	VALUE elt = RARRAY_AREF(ary2, i);
 	if (!st_update(RHASH_TBL_RAW(hash), (st_data_t)elt, ary_hash_orset, (st_data_t)elt)) {
-	    OBJ_WRITTEN(hash, Qundef, elt);
+	    RB_OBJ_WRITTEN(hash, Qundef, elt);
 	}
     }
     ary3 = rb_hash_values(hash);
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 44298)
+++ include/ruby/ruby.h	(revision 44299)
@@ -901,7 +901,7 @@ struct RArray { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L901
 #define RARRAY_AREF(a, i)    (RARRAY_CONST_PTR(a)[i])
 #define RARRAY_ASET(a, i, v) do { \
     const VALUE _ary_ = (a); \
-    OBJ_WRITE(_ary_, &RARRAY_CONST_PTR(_ary_)[i], (v)); \
+    RB_OBJ_WRITE(_ary_, &RARRAY_CONST_PTR(_ary_)[i], (v)); \
 } while (0)
 
 #define RARRAY_PTR(a) ((VALUE *)RARRAY_CONST_PTR(RGENGC_WB_PROTECTED_ARRAY ? OBJ_WB_UNPROTECT((VALUE)a) : ((VALUE)a)))
@@ -942,8 +942,8 @@ struct RRational { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L942
     const VALUE den;
 };
 
-#define RRATIONAL_SET_NUM(rat, n) OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
-#define RRATIONAL_SET_DEN(rat, d) OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
+#define RRATIONAL_SET_NUM(rat, n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
+#define RRATIONAL_SET_DEN(rat, d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
 
 struct RComplex {
     struct RBasic basic;
@@ -951,8 +951,8 @@ struct RComplex { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L951
     const VALUE imag;
 };
 
-#define RCOMPLEX_SET_REAL(cmp, r) OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->real,(r))
-#define RCOMPLEX_SET_IMAG(cmp, i) OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->imag,(i))
+#define RCOMPLEX_SET_REAL(cmp, r) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->real,(r))
+#define RCOMPLEX_SET_IMAG(cmp, i) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->imag,(i))
 
 struct RData {
     struct RBasic basic;
@@ -1067,7 +1067,7 @@ struct RStruct { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1067
    RSTRUCT(st)->as.heap.ptr)
 #define RSTRUCT_PTR(st) ((VALUE *)RSTRUCT_CONST_PTR(RGENGC_WB_PROTECTED_STRUCT ? OBJ_WB_UNPROTECT((VALUE)st) : (VALUE)st))
 
-#define RSTRUCT_SET(st, idx, v) OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
+#define RSTRUCT_SET(st, idx, v) RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
 #define RSTRUCT_GET(st, idx)    (RSTRUCT_CONST_PTR(st)[idx])
 
 #define RBIGNUM_EMBED_LEN_NUMBITS 3
@@ -1200,9 +1200,9 @@ void rb_gc_writebarrier_unprotect_promot https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1200
 #endif
 
 /* Write barrier (WB) interfaces:
- * - OBJ_WRITE(a, slot, b): WB for new reference from `a' to `b'.
+ * - RB_OBJ_WRITE(a, slot, b): WB for new reference from `a' to `b'.
  *     Write `b' into `*slot'. `slot' is a pointer in `a'.
- * - OBJ_WRITTEN(a, oldv, b): WB for new reference from `a' to `b'.
+ * - RB_OBJ_WRITTEN(a, oldv, b): WB for new reference from `a' to `b'.
  *     This doesn't write any values, but only a WB declaration.
  *     `oldv' is replaced value with `b' (not used in current Ruby).
  * 
@@ -1210,8 +1210,8 @@ void rb_gc_writebarrier_unprotect_promot https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1210
  *       Please catch up if you want to insert WB into C-extensions
  *       correctly.
  */
-#define OBJ_WRITE(a, slot, b)       rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
-#define OBJ_WRITTEN(a, oldv, b)     rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
+#define RB_OBJ_WRITE(a, slot, b)       rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
+#define RB_OBJ_WRITTEN(a, oldv, b)     rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
 
 #ifndef USE_RGENGC_LOGGING_WB_UNPROTECT
 #define USE_RGENGC_LOGGING_WB_UNPROTECT 0
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44298)
+++ ChangeLog	(revision 44299)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec 20 17:03:10 2013  Koichi Sasada  <ko1@a...>
+
+	* include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
+	  RB_OBJ_WRITE and RB_OBJ_WRITTEN.
+
+	* array.c, class.c, compile.c, hash.c, internal.h, iseq.c,
+	  proc.c, process.c, re.c, string.c, variable.c, vm.c,
+	  vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, 
+	  vm_method.c: catch up this change.
+
 Fri Dec 20 16:01:35 2013  Koichi Sasada  <ko1@a...>
 
 	* include/ruby/ruby.h: add a comment for WB interfaces.
Index: re.c
===================================================================
--- re.c	(revision 44298)
+++ re.c	(revision 44299)
@@ -2460,7 +2460,7 @@ rb_reg_initialize(VALUE obj, const char https://github.com/ruby/ruby/blob/trunk/re.c#L2460
 			  options & ARG_REG_OPTION_MASK, err,
 			  sourcefile, sourceline);
     if (!re->ptr) return -1;
-    OBJ_WRITE(obj, &re->src, rb_fstring(rb_enc_str_new(s, len, enc)));
+    RB_OBJ_WRITE(obj, &re->src, rb_fstring(rb_enc_str_new(s, len, enc)));
     RB_GC_GUARD(unescaped);
     return 0;
 }
@@ -2494,7 +2494,7 @@ rb_reg_s_alloc(VALUE klass) https://github.com/ruby/ruby/blob/trunk/re.c#L2494
     NEWOBJ_OF(re, struct RRegexp, klass, T_REGEXP | (RGENGC_WB_PROTECTED_REGEXP ? FL_WB_PROTECTED : 0));
 
     re->ptr = 0;
-    OBJ_WRITE(re, &re->src, 0);
+    RB_OBJ_WRITE(re, &re->src, 0);
     re->usecnt = 0;
 
     return (VALUE)re;
Index: variable.c
===================================================================
--- variable.c	(revision 44298)
+++ variable.c	(revision 44299)
@@ -947,11 +947,11 @@ generic_ivar_set(VALUE obj, ID id, VALUE https://github.com/ruby/ruby/blob/trunk/variable.c#L947
 	tbl = st_init_numtable();
 	st_add_direct(generic_iv_tbl, (st_data_t)obj, (st_data_t)tbl);
 	st_add_direct(tbl, (st_data_t)id, (st_data_t)val);
-	if (FL_ABLE(obj)) OBJ_WRITTEN(obj, Qundef, val);
+	if (FL_ABLE(obj)) RB_OBJ_WRITTEN(obj, Qundef, val);
 	return;
     }
     st_insert((st_table *)data, (st_data_t)id, (st_data_t)val);
-    if (FL_ABLE(obj)) OBJ_WRITTEN(obj, data, val);
+    if (FL_ABLE(obj)) RB_OBJ_WRITTEN(obj, data, val);
 }
 
 static VALUE
@@ -1188,7 +1188,7 @@ rb_ivar_set(VALUE obj, ID id, VALUE val) https://github.com/ruby/ruby/blob/trunk/variable.c#L1188
                 ROBJECT(obj)->as.heap.iv_index_tbl = iv_index_tbl;
             }
         }
-        OBJ_WRITE(obj, &ROBJECT_IVPTR(obj)[index], val);
+        RB_OBJ_WRITE(obj, &ROBJECT_IVPTR(obj)[index], val);
 	break;
       case T_CLASS:
       case T_MODULE:
@@ -1631,7 +1631,7 @@ rb_autoload(VALUE mod, ID id, const char https://github.com/ruby/ruby/blob/trunk/variable.c#L1631
 	if (!tbl) tbl = RCLASS_IV_TBL(mod) = st_init_numtable();
 	av = (st_data_t)TypedData_Wrap_Struct(0, &autoload_data_type, 0);
 	st_add_direct(tbl, (st_data_t)autoload, av);
-	OBJ_WRITTEN(mod, Qnil, av);
+	RB_OBJ_WRITTEN(mod, Qnil, av);
 	DATA_PTR(av) = tbl = st_init_numtable();
     }
     fn = rb_str_new2(file);
@@ -2215,8 +2215,8 @@ rb_const_set(VALUE klass, ID id, VALUE v https://github.com/ruby/ruby/blob/trunk/variable.c#L2215
     ce->flag = visibility;
     ce->line = rb_sourceline();
     st_insert(RCLASS_CONST_TBL(klass), (st_data_t)id, (st_data_t)ce);
-    OBJ_WRITE(klass, &ce->value, val);
-    OBJ_WRITE(klass, &ce->file, rb_sourcefilename());
+    RB_OBJ_WRITE(klass, &ce->value, val);
+    RB_OBJ_WRITE(klass, &ce->file, rb_sourcefilename());
 }
 
 void
@@ -2615,14 +2615,14 @@ int https://github.com/ruby/ruby/blob/trunk/variable.c#L2615
 rb_st_insert_id_and_value(VALUE obj, st_table *tbl, ID key, VALUE value)
 {
     int result = st_insert(tbl, (st_data_t)key, (st_data_t)value);
-    OBJ_WRITTEN(obj, Qundef, value);
+    RB_OBJ_WRITTEN(obj, Qundef, value);
     return result;
 }
 
 static int
 tbl_copy_i(st_data_t key, st_data_t value, st_data_t data)
 {
-    OBJ_WRITTEN((VALUE)data, Qundef, (VALUE)value);
+    RB_OBJ_WRITTEN((VALUE)data, Qundef, (VALUE)value);
     return ST_CONTINUE;
 }
 
Index: iseq.c
===================================================================
--- iseq.c	(revision 44298)
+++ iseq.c	(revision 44299)
@@ -183,20 +183,20 @@ static rb_iseq_location_t * https://github.com/ruby/ruby/blob/trunk/iseq.c#L183
 iseq_location_setup(rb_iseq_t *iseq, VALUE path, VALUE absolute_path, VALUE name, size_t first_lineno)
 {
     rb_iseq_location_t *loc = &iseq->location;
-    OBJ_WRITE(iseq->self, &loc->path, path);
+    RB_OBJ_WRITE(iseq->self, &loc->path, path);
     if (RTEST(absolute_path) && rb_str_cmp(path, absolute_path) == 0) {
-	OBJ_WRITE(iseq->self, &loc->absolute_path, path);
+	RB_OBJ_WRITE(iseq->self, &loc->absolute_path, path);
     }
     else {
-	OBJ_WRITE(iseq->self, &loc->absolute_path, absolute_path);
+	RB_OBJ_WRITE(iseq->self, &loc->absolute_path, absolute_path);
     }
-    OBJ_WRITE(iseq->self, &loc->label, name);
-    OBJ_WRITE(iseq->self, &loc->base_label, name);
+    RB_OBJ_WRITE(iseq->self, &loc->label, name);
+    RB_OBJ_WRITE(iseq->self, &loc->base_label, name);
     loc->first_lineno = first_lineno;
     return loc;
 }
 
-#define ISEQ_SET_CREF(iseq, cref) OBJ_WRITE((iseq)->self, &(iseq)->cref_stack, (cref))
+#define ISEQ_SET_CREF(iseq, cref) RB_OBJ_WRITE((iseq)->self, &(iseq)->cref_stack, (cref))
 
 static void
 set_relation(rb_iseq_t *iseq, const VALUE parent)
@@ -208,14 +208,14 @@ set_relation(rb_iseq_t *iseq, const VALU https://github.com/ruby/ruby/blob/trunk/iseq.c#L208
     /* set class nest stack */
     if (type == ISEQ_TYPE_TOP) {
 	/* toplevel is private */
-	OBJ_WRITE(iseq->self, &iseq->cref_stack, NEW_CREF(rb_cObject));
+	RB_OBJ_WRITE(iseq->self, &iseq->cref_stack, NEW_CREF(rb_cObject));
 	iseq->cref_stack->nd_refinements = Qnil;
 	iseq->cref_stack->nd_visi = NOEX_PRIVATE;
 	if (th->top_wrapper) {
 	    NODE *cref = NEW_CREF(th->top_wrapper);
 	    cref->nd_refinements = Qnil;
 	    cref->nd_visi = NOEX_PRIVATE;
-	    OBJ_WRITE(cref, &cref->nd_next, iseq->cref_stack);
+	    RB_OBJ_WRITE(cref, &cref->nd_next, iseq->cref_stack);
 	    ISEQ_SET_CREF(iseq, cref);
 	}
 	iseq->local_iseq = iseq;
@@ -245,7 +245,7 @@ void https://github.com/ruby/ruby/blob/trunk/iseq.c#L245
 rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj)
 {
     if (!RTEST(iseq->mark_ary)) {
-	OBJ_WRITE(iseq->self, &iseq->mark_ary, rb_ary_tmp_new(3));
+	RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, rb_ary_tmp_new(3));
 	RBASIC_CLEAR_CLASS(iseq->mark_ary);
     }
     rb_ary_push(iseq->mark_ary, obj);
@@ -261,7 +261,7 @@ prepare_iseq_build(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/iseq.c#L261
     iseq->arg_rest = -1;
     iseq->arg_block = -1;
     iseq->arg_keyword = -1;
-    OBJ_WRITE(iseq->self, &iseq->klass, 0);
+    RB_OBJ_WRITE(iseq->self, &iseq->klass, 0);
     set_relation(iseq, parent);
 
     name = rb_fstring(name);
@@ -271,11 +271,11 @@ prepare_iseq_build(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/iseq.c#L271
 
     iseq_location_setup(iseq, path, absolute_path, name, first_lineno);
     if (iseq != iseq->local_iseq) {
-	OBJ_WRITE(iseq->self, &iseq->location.base_label, iseq->local_iseq->location.label);
+	RB_OBJ_WRITE(iseq->self, &iseq->location.base_label, iseq->local_iseq->location.label);
     }
 
     iseq->defined_method_id = 0;
-    OBJ_WRITE(iseq->self, &iseq->mark_ary, 0);
+    RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, 0);
 
     /*
      * iseq->special_block_builder = GC_GUARDED_PTR_REF(block_opt);
@@ -285,15 +285,15 @@ prepare_iseq_build(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/iseq.c#L285
 
     iseq->compile_data = ALLOC(struct iseq_compile_data);
     MEMZERO(iseq->compile_data, struct iseq_compile_data, 1);
-    OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, Qnil);
-    OBJ_WRITE(iseq->self, &iseq->compile_data->mark_ary, rb_ary_tmp_new(3));
+    RB_OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, Qnil);
+    RB_OBJ_WRITE(iseq->self, &iseq->compile_data->mark_ary, rb_ary_tmp_new(3));
 
     iseq->compile_data->storage_head = iseq->compile_data->storage_current =
       (struct iseq_compile_data_storage *)
 	ALLOC_N(char, INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE +
 		sizeof(struct iseq_compile_data_storage));
 
-    OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, rb_ary_new());
+    RB_OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, rb_ary_new());
     iseq->compile_data->storage_head->pos = 0;
     iseq->compile_data->storage_head->next = 0;
     iseq->compile_data->storage_head->size =
@@ -303,12 +303,12 @@ prepare_iseq_build(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/iseq.c#L303
     iseq->compile_data->option = option;
     iseq->compile_data->last_coverable_line = -1;
 
-    OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse);
+    RB_OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse);
     if (!GET_THREAD()->parse_in_eval) {
 	VALUE coverages = rb_get_coverages();
 	if (RTEST(coverages)) {
-	    OBJ_WRITE(iseq->self, &iseq->coverage, rb_hash_lookup(coverages, path));
-	    if (NIL_P(iseq->coverage)) OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse);
+	    RB_OBJ_WRITE(iseq->self, &iseq->coverage, rb_hash_lookup(coverages, path));
+	    if (NIL_P(iseq->coverage)) RB_OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse);
 	}
     }
 
@@ -1923,19 +1923,19 @@ rb_iseq_clone(VALUE iseqval, VALUE newcb https://github.com/ruby/ruby/blob/trunk/iseq.c#L1923
 
     iseq1->self = newiseq;
     if (!iseq1->orig) {
-	OBJ_WRITE(iseq1->self, &iseq1->orig, iseqval);
+	RB_OBJ_WRITE(iseq1->self, &iseq1->orig, iseqval);
     }
     if (iseq0->local_iseq == iseq0) {
 	iseq1->local_iseq = iseq1;
     }
     if (newcbase) {
 	ISEQ_SET_CREF(iseq1, NEW_CREF(newcbase));
-	OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_refinements, iseq0->cref_stack->nd_refinements);
+	RB_OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_refinements, iseq0->cref_stack->nd_refinements);
 	iseq1->cref_stack->nd_visi = iseq0->cref_stack->nd_visi;
 	if (iseq0->cref_stack->nd_next) {
-	    OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_next, iseq0->cref_stack->nd_next);
+	    RB_OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_next, iseq0->cref_stack->nd_next);
 	}
-	OBJ_WRITE(iseq1, &iseq1->klass, newcbase);
+	RB_OBJ_WRITE(iseq1, &iseq1->klass, newcbase);
     }
 
     return newiseq;
@@ -2087,10 +2087,10 @@ rb_iseq_build_for_ruby2cext( https://github.com/ruby/ruby/blob/trunk/iseq.c#L2087
 
     /* copy iseq */
     MEMCPY(iseq, iseq_template, rb_iseq_t, 1); /* TODO: write barrier, *iseq = *iseq_template; */
-    OBJ_WRITE(iseq->self, &iseq->location.label, rb_str_new2(name));
-    OBJ_WRITE(iseq->self, &iseq->location.path, rb_str_new2(path));
+    RB_OBJ_WRITE(iseq->self, &iseq->location.label, rb_str_new2(name));
+    RB_OBJ_WRITE(iseq->self, &iseq->location.path, rb_str_new2(path));
     iseq->location.first_lineno = first_lineno;
-    OBJ_WRITE(iseq->self, &iseq->mark_ary, 0);
+    RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, 0);
     iseq->self = iseqval;
 
     iseq->iseq = ALLOC_N(VALUE, iseq->iseq_size);
Index: string.c
===================================================================
--- string.c	(revision 44298)
+++ string.c	(revision 44299)
@@ -114,7 +114,7 @@ VALUE rb_cSymbol; https://github.com/ruby/ruby/blob/trunk/string.c#L114
 } while (0)
 
 #define STR_SET_SHARED(str, shared_str) do { \
-    OBJ_WRITE((str), &RSTRING(str)->as.heap.aux.shared, (shared_str)); \
+    RB_OBJ_WRITE((str), &RSTRING(str)->as.heap.aux.shared, (shared_str)); \
     FL_SET((str), ELTS_SHARED); \
 } while (0)
 
@@ -822,7 +822,7 @@ rb_str_new_frozen(VALUE orig) https://github.com/ruby/ruby/blob/trunk/string.c#L822
 	FL_UNSET(orig, STR_ASSOC);
 	str = str_new4(klass, orig);
 	FL_SET(str, STR_ASSOC);
-	OBJ_WRITE(str, &RSTRING(str)->as.heap.aux.shared, assoc);
+	RB_OBJ_WRITE(str, &RSTRING(str)->as.heap.aux.shared, assoc);
 	/* TODO: WB is not needed because str is new object */
     }
     else {
@@ -955,7 +955,7 @@ rb_str_shared_replace(VALUE str, VALUE s https://github.com/ruby/ruby/blob/trunk/string.c#L955
     if (STR_NOCAPA_P(str2)) {
 	VALUE shared = RSTRING(str2)->as.heap.aux.shared;
 	FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
-	OBJ_WRITE(str, &RSTRING(str)->as.heap.aux.shared, shared);
+	RB_OBJ_WRITE(str, &RSTRING(str)->as.heap.aux.shared, shared);
     }
     else {
 	RSTRING(str)->as.heap.aux.capa = RSTRING(str2)->as.heap.aux.capa;
@@ -1523,7 +1523,7 @@ rb_str_associate(VALUE str, VALUE add) https://github.com/ruby/ruby/blob/trunk/string.c#L1523
 	}
 	FL_SET(str, STR_ASSOC);
 	RBASIC_CLEAR_CLASS(add);
-	OBJ_WRITE(str, &RSTRING(str)->as.heap.aux.shared, add);
+	RB_OBJ_WRITE(str, &RSTRING(str)->as.heap.aux.shared, add);
     }
 }
 
Index: compile.c
===================================================================
--- compile.c	(revision 44298)
+++ compile.c	(revision 44299)
@@ -278,7 +278,7 @@ r_value(VALUE value) https://github.com/ruby/ruby/blob/trunk/compile.c#L278
   if (compile_debug) rb_compile_bug strs;          \
   GET_THREAD()->errinfo = iseq->compile_data->err_info;  \
   rb_compile_error strs;                           \
-  OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, GET_THREAD()->errinfo); \
+  RB_OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, GET_THREAD()->errinfo); \
   GET_THREAD()->errinfo = tmp;                     \
   ret = 0;                                         \
   break;                                           \
@@ -1710,7 +1710,7 @@ iseq_set_exception_table(rb_iseq_t *iseq https://github.com/ruby/ruby/blob/trunk/compile.c#L1710
 	}
     }
 
-    OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, 0); /* free */
+    RB_OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, 0); /* free */
     return COMPILE_OK;
 }
 
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 44298)
+++ vm_eval.c	(revision 44299)
@@ -1546,7 +1546,7 @@ rb_yield_refine_block(VALUE refinement, https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1546
     }
     cref = vm_cref_push(th, refinement, NOEX_PUBLIC, blockptr);
     cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL;
-    OBJ_WRITE(cref, &cref->nd_refinements, refinements);
+    RB_OBJ_WRITE(cref, &cref->nd_refinements, refinements);
 
     return vm_yield_with_cref(th, 0, NULL, cref);
 }
Index: proc.c
===================================================================
--- proc.c	(revision 44298)
+++ proc.c	(revision 44299)
@@ -1662,7 +1662,7 @@ rb_mod_define_method(int argc, VALUE *ar https://github.com/ruby/ruby/blob/trunk/proc (... truncated)

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

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