summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-27 02:58:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-27 02:58:32 +0000
commitd94dcf1e10e090d60960eed237c8b21e5bd6323c (patch)
treea76d3be1b578227697f5ad33efe11dc22a54691f /parse.y
parentb1cd933e983c826cc5f54f95f603764edbbc7f5d (diff)
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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 5 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 1977a5fd04..f04c10846d 100644
--- a/parse.y
+++ b/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;
}