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

ruby-changes:15090

From: nobu <ko1@a...>
Date: Thu, 18 Mar 2010 04:41:24 +0900 (JST)
Subject: [ruby-changes:15090] Ruby:r26967 (trunk): * parse.y (rb_intern3): get rid of type-punning cast.

nobu	2010-03-18 04:41:00 +0900 (Thu, 18 Mar 2010)

  New Revision: 26967

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

  Log:
    * parse.y (rb_intern3): get rid of type-punning cast.

  Modified files:
    trunk/ChangeLog
    trunk/parse.y

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26966)
+++ ChangeLog	(revision 26967)
@@ -1,3 +1,7 @@
+Thu Mar 18 04:40:56 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (rb_intern3): get rid of type-punning cast.
+
 Thu Mar 18 02:29:42 2010  Yusuke Endoh  <mame@t...>
 
 	* compile.c (iseq_build_body): add mark to jump table hash of case.
Index: parse.y
===================================================================
--- parse.y	(revision 26966)
+++ parse.y	(revision 26967)
@@ -9496,6 +9496,7 @@
     ID id;
     long last;
     int mb;
+    st_data_t data;
     struct RString fake_str;
     fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE;
     fake_str.basic.klass = rb_cString;
@@ -9509,8 +9510,8 @@
     	rb_raise(rb_eEncodingError, "invalid encoding symbol");
     }
 
-    if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id))
-	return id;
+    if (st_lookup(global_symbols.sym_id, str, &data))
+	return (ID)data;
 
     if (rb_cString && !rb_enc_asciicompat(enc)) {
 	id = ID_JUNK;

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

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