ruby-changes:32248
From: ko1 <ko1@a...>
Date: Sun, 22 Dec 2013 04:11:20 +0900 (JST)
Subject: [ruby-changes:32248] ko1:r44327 (trunk): * gc.c (ruby_gc_set_params): don't show obsolete warnings for
ko1 2013-12-22 04:11:12 +0900 (Sun, 22 Dec 2013) New Revision: 44327 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44327 Log: * gc.c (ruby_gc_set_params): don't show obsolete warnings for RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given. [Bug #9276] Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 44326) +++ ChangeLog (revision 44327) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Dec 22 04:07:55 2013 Koichi Sasada <ko1@a...> + + * gc.c (ruby_gc_set_params): don't show obsolete warnings for + RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if + RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given. + [Bug #9276] + Sat Dec 21 13:00:20 2013 Nobuyoshi Nakada <nobu@r...> * file.c: remove unnecessary the source path from EEXIST error Index: gc.c =================================================================== --- gc.c (revision 44326) +++ gc.c (revision 44327) @@ -5724,17 +5724,19 @@ ruby_gc_set_params(int safe_level) https://github.com/ruby/ruby/blob/trunk/gc.c#L5724 if (safe_level > 0) return; /* RUBY_GC_HEAP_FREE_SLOTS */ - if (get_envparam_int ("RUBY_FREE_MIN", &gc_params.heap_free_slots, 0)) { + if (get_envparam_int("RUBY_GC_HEAP_FREE_SLOTS", &gc_params.heap_free_slots, 0)) { + /* ok */ + } + else if (get_envparam_int("RUBY_FREE_MIN", &gc_params.heap_free_slots, 0)) { rb_warn("RUBY_FREE_MIN is obsolete. Use RUBY_GC_HEAP_FREE_SLOTS instead."); } - get_envparam_int ("RUBY_GC_HEAP_FREE_SLOTS", &gc_params.heap_free_slots, 0); /* RUBY_GC_HEAP_INIT_SLOTS */ - if (get_envparam_int("RUBY_HEAP_MIN_SLOTS", &gc_params.heap_init_slots, 0)) { - rb_warn("RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead."); + if (get_envparam_int("RUBY_GC_HEAP_INIT_SLOTS", &gc_params.heap_init_slots, 0)) { gc_set_initial_pages(); } - if (get_envparam_int("RUBY_GC_HEAP_INIT_SLOTS", &gc_params.heap_init_slots, 0)) { + else if (get_envparam_int("RUBY_HEAP_MIN_SLOTS", &gc_params.heap_init_slots, 0)) { + rb_warn("RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead."); gc_set_initial_pages(); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/