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

ruby-changes:31933

From: ko1 <ko1@a...>
Date: Thu, 5 Dec 2013 21:07:05 +0900 (JST)
Subject: [ruby-changes:31933] ko1:r44012 (trunk): * gc.c (gc_info_decode): fix to avoid syntax error on VS2012.

ko1	2013-12-05 21:06:59 +0900 (Thu, 05 Dec 2013)

  New Revision: 44012

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

  Log:
    * gc.c (gc_info_decode): fix to avoid syntax error on VS2012.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44011)
+++ ChangeLog	(revision 44012)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Dec  5 21:05:42 2013  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_info_decode): fix to avoid syntax error on VS2012.
+
 Thu Dec  5 19:35:35 2013  Martin Duerst <duerst@i...>
 
 	* st.c: tweaked comment
Index: gc.c
===================================================================
--- gc.c	(revision 44011)
+++ gc.c	(revision 44012)
@@ -5063,6 +5063,7 @@ gc_info_decode(int flags, VALUE hash_or_ https://github.com/ruby/ruby/blob/trunk/gc.c#L5063
     static VALUE sym_nofree, sym_oldgen, sym_shady, sym_rescan, sym_stress, sym_oldmalloc;
     static VALUE sym_newobj, sym_malloc, sym_method, sym_capi;
     VALUE hash = Qnil, key = Qnil;
+    VALUE major_by;
 
     if (SYMBOL_P(hash_or_key))
 	key = hash_or_key;
@@ -5096,17 +5097,17 @@ gc_info_decode(int flags, VALUE hash_or_ https://github.com/ruby/ruby/blob/trunk/gc.c#L5097
     else if (hash != Qnil) \
 	rb_hash_aset(hash, sym_##name, (attr));
 
-    SET(major_by,
-	(flags & GPR_FLAG_MAJOR_BY_NOFREE) ? sym_nofree :
-	(flags & GPR_FLAG_MAJOR_BY_OLDGEN) ? sym_oldgen :
-	(flags & GPR_FLAG_MAJOR_BY_SHADY)  ? sym_shady :
-	(flags & GPR_FLAG_MAJOR_BY_RESCAN) ? sym_rescan :
-	(flags & GPR_FLAG_MAJOR_BY_STRESS) ? sym_stress :
+    major_by = 
+      (flags & GPR_FLAG_MAJOR_BY_NOFREE) ? sym_nofree :
+      (flags & GPR_FLAG_MAJOR_BY_OLDGEN) ? sym_oldgen :
+      (flags & GPR_FLAG_MAJOR_BY_SHADY)  ? sym_shady :
+      (flags & GPR_FLAG_MAJOR_BY_RESCAN) ? sym_rescan :
+      (flags & GPR_FLAG_MAJOR_BY_STRESS) ? sym_stress :
 #if RGENGC_ESTIMATE_OLDMALLOC
-	(flags & GPR_FLAG_MAJOR_BY_OLDMALLOC) ? sym_oldmalloc :
+      (flags & GPR_FLAG_MAJOR_BY_OLDMALLOC) ? sym_oldmalloc :
 #endif
-	Qnil
-    );
+      Qnil;
+    SET(major_by, major_by);
 
     SET(gc_by,
 	(flags & GPR_FLAG_NEWOBJ) ? sym_newobj :

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

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