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

ruby-changes:40637

From: odaira <ko1@a...>
Date: Sun, 22 Nov 2015 22:41:21 +0900 (JST)
Subject: [ruby-changes:40637] odaira:r52716 (trunk): * gc.c (rb_raw_obj_info): fix compile errors when USE_RGENGC

odaira	2015-11-22 22:41:08 +0900 (Sun, 22 Nov 2015)

  New Revision: 52716

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

  Log:
    * gc.c (rb_raw_obj_info): fix compile errors when USE_RGENGC
      is 0.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52715)
+++ ChangeLog	(revision 52716)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Nov 22 22:23:37 2015  Rei Odaira  <Rei.Odaira@g...>
+
+	* gc.c (rb_raw_obj_info): fix compile errors when USE_RGENGC
+	  is 0.
+
 Sun Nov 22 21:58:09 2015  Naohisa Goto  <ngotogenome@g...>
 
 	* lib/cmath.rb: methods which has suffix '!' are now deprecated.
Index: gc.c
===================================================================
--- gc.c	(revision 52715)
+++ gc.c	(revision 52716)
@@ -8965,11 +8965,12 @@ rb_raw_obj_info(char *buff, const int bu https://github.com/ruby/ruby/blob/trunk/gc.c#L8965
 	snprintf(buff, buff_size, "%s", obj_type_name(obj));
     }
     else {
-	const int age = RVALUE_FLAGS_AGE(RBASIC(obj)->flags);
-	const int type = BUILTIN_TYPE(obj);
-
 #define TF(c) ((c) != 0 ? "true" : "false")
 #define C(c, s) ((c) != 0 ? (s) : " ")
+	const int type = BUILTIN_TYPE(obj);
+#if USE_RGENGC
+	const int age = RVALUE_FLAGS_AGE(RBASIC(obj)->flags);
+
 	snprintf(buff, buff_size, "%p [%d%s%s%s%s] %s",
 		 (void *)obj, age,
 		 C(RVALUE_UNCOLLECTIBLE_BITMAP(obj),  "L"),
@@ -8977,6 +8978,12 @@ rb_raw_obj_info(char *buff, const int bu https://github.com/ruby/ruby/blob/trunk/gc.c#L8978
 		 C(RVALUE_MARKING_BITMAP(obj),        "R"),
 		 C(RVALUE_WB_UNPROTECTED_BITMAP(obj), "U"),
 		 obj_type_name(obj));
+#else
+	snprintf(buff, buff_size, "%p [%s] %s",
+		 (void *)obj,
+		 C(RVALUE_MARK_BITMAP(obj),           "M"),
+		 obj_type_name(obj));
+#endif
 
 	if (internal_object_p(obj)) {
 	    /* ignore */

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

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