mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* internal.h (USE_SYMBOL_GC): enable Symbol GC by default (USE_SYMBOL_GC == 1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
17a6f9227a
commit
b9ea135950
3 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Mar 26 14:33:00 2014 Narihiro Nakamura <authornari@gmail.com>
|
||||
|
||||
* internal.h (USE_SYMBOL_GC): enable Symbol GC by default (USE_SYMBOL_GC == 1).
|
||||
|
||||
Tue Mar 25 22:57:11 2014 Narihiro Nakamura <authornari@gmail.com>
|
||||
|
||||
* parse.y: support Symbol GC. [ruby-trunk Feature #9634]
|
||||
|
|
|
@ -729,6 +729,9 @@ struct RBasicRaw {
|
|||
} 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);
|
||||
|
|
4
parse.y
4
parse.y
|
@ -10669,6 +10669,7 @@ rb_gc_free_dsymbol(VALUE ptr)
|
|||
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)
|
|||
}
|
||||
|
||||
return dsym;
|
||||
#else
|
||||
return rb_str_intern(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in a new issue