From 49042ae821cb15986ab92d030960ee84154ae8a7 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 9 Sep 2011 23:34:05 +0000 Subject: [PATCH] * gc.c (GC_PROFILE_MORE_DETAIL, CALC_EXACT_MALLOC_SIZE): define macros only if they are not defined. fixes: [Ruby 1.9 - Feature #5291] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ gc.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0f83d62b43..2e3a87b973 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Sep 10 08:30:03 2011 Koichi Sasada + + * gc.c (GC_PROFILE_MORE_DETAIL, CALC_EXACT_MALLOC_SIZE): + define macros only if they are not defined. + fixes: [Ruby 1.9 - Feature #5291] + Sat Sep 10 08:25:47 2011 Yukihiro Matsumoto * parse.y (bv_decls): parse.y relies on $$ = $1 before action diff --git a/gc.c b/gc.c index f0d74c9c31..48a1db32d5 100644 --- a/gc.c +++ b/gc.c @@ -93,7 +93,10 @@ static unsigned int initial_free_min = FREE_MIN; int ruby_gc_debug_indent = 0; /* for GC profile */ +#ifndef GC_PROFILE_MORE_DETAIL #define GC_PROFILE_MORE_DETAIL 0 +#endif + typedef struct gc_profile_record { double gc_time; double gc_mark_time; @@ -309,7 +312,9 @@ struct gc_list { struct gc_list *next; }; +#ifndef CALC_EXACT_MALLOC_SIZE #define CALC_EXACT_MALLOC_SIZE 0 +#endif typedef struct rb_objspace { struct {