ruby-changes:33349
From: nari <ko1@a...>
Date: Wed, 26 Mar 2014 14:39:29 +0900 (JST)
Subject: [ruby-changes:33349] nari:r45428 (trunk): * internal.h (USE_SYMBOL_GC): enable Symbol GC by default (USE_SYMBOL_GC == 1).
nari 2014-03-26 14:39:22 +0900 (Wed, 26 Mar 2014) New Revision: 45428 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45428 Log: * internal.h (USE_SYMBOL_GC): enable Symbol GC by default (USE_SYMBOL_GC == 1). Modified files: trunk/ChangeLog trunk/internal.h trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 45427) +++ ChangeLog (revision 45428) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Mar 26 14:33:00 2014 Narihiro Nakamura <authornari@g...> + + * internal.h (USE_SYMBOL_GC): enable Symbol GC by default (USE_SYMBOL_GC == 1). + Tue Mar 25 22:57:11 2014 Narihiro Nakamura <authornari@g...> * parse.y: support Symbol GC. [ruby-trunk Feature #9634] Index: parse.y =================================================================== --- parse.y (revision 45427) +++ parse.y (revision 45428) @@ -10669,6 +10669,7 @@ rb_gc_free_dsymbol(VALUE ptr) https://github.com/ruby/ruby/blob/trunk/parse.y#L10669 VALUE rb_str_dynamic_intern(VALUE s) { +#if USE_SYMBOL_GC VALUE str = RB_GC_GUARD(s); VALUE dup; rb_encoding *enc; @@ -10704,6 +10705,9 @@ rb_str_dynamic_intern(VALUE s) https://github.com/ruby/ruby/blob/trunk/parse.y#L10705 } return dsym; +#else + return rb_str_intern(s); +#endif } static int Index: internal.h =================================================================== --- internal.h (revision 45427) +++ internal.h (revision 45428) @@ -729,6 +729,9 @@ struct RBasicRaw { https://github.com/ruby/ruby/blob/trunk/internal.h#L729 } while (0) /* parse.y */ +#ifndef USE_SYMBOL_GC +#define USE_SYMBOL_GC 1 +#endif VALUE rb_parser_get_yydebug(VALUE); VALUE rb_parser_set_yydebug(VALUE, VALUE); int rb_is_const_name(VALUE name); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/