mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: type-punning cast
* parse.y (rb_gc_free_dsymbol): use intermediate st_data_t and get rid of type-punning cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b1cd933e98
commit
d94dcf1e10
1 changed files with 5 additions and 2 deletions
7
parse.y
7
parse.y
|
@ -10661,8 +10661,11 @@ rb_intern_str(VALUE str)
|
|||
void
|
||||
rb_gc_free_dsymbol(VALUE ptr)
|
||||
{
|
||||
st_delete(global_symbols.sym_id, (st_data_t *)&RSYMBOL(ptr)->fstr, 0);
|
||||
st_delete(global_symbols.id_str, (st_data_t *)&ptr, 0);
|
||||
st_data_t data;
|
||||
data = (st_data_t)RSYMBOL(ptr)->fstr;
|
||||
st_delete(global_symbols.sym_id, &data, 0);
|
||||
data = (st_data_t)ptr;
|
||||
st_delete(global_symbols.id_str, &data, 0);
|
||||
RSYMBOL(ptr)->fstr = (VALUE)NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue