[前][次][番号順一覧][スレッド一覧]

ruby-changes:33364

From: nobu <ko1@a...>
Date: Thu, 27 Mar 2014 11:58:38 +0900 (JST)
Subject: [ruby-changes:33364] nobu:r45443 (trunk): parse.y: type-punning cast

nobu	2014-03-27 11:58:32 +0900 (Thu, 27 Mar 2014)

  New Revision: 45443

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45443

  Log:
    parse.y: type-punning cast
    
    * parse.y (rb_gc_free_dsymbol): use intermediate st_data_t and get
      rid of type-punning cast.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 45442)
+++ parse.y	(revision 45443)
@@ -10661,8 +10661,11 @@ rb_intern_str(VALUE str) https://github.com/ruby/ruby/blob/trunk/parse.y#L10661
 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;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]