From b9cf1033aab2f2622aadd8093bd897590da028d0 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 5 Dec 2013 12:06:59 +0000 Subject: [PATCH] * gc.c (gc_info_decode): fix to avoid syntax error on VS2012. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ gc.c | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f4a76821a..be5dda2a33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 5 21:05:42 2013 Koichi Sasada + + * gc.c (gc_info_decode): fix to avoid syntax error on VS2012. + Thu Dec 5 19:35:35 2013 Martin Duerst * st.c: tweaked comment diff --git a/gc.c b/gc.c index 43498613fb..46ac9be2dc 100644 --- a/gc.c +++ b/gc.c @@ -5063,6 +5063,7 @@ gc_info_decode(int flags, VALUE hash_or_key) 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_key) 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 :