summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-17 19:41:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-17 19:41:00 +0000
commit83b8f94f4ef67735a20cfcc4ddd3df886017ee6a (patch)
tree41d49f1fafc6d95a9e2bd2d95cc0b8b5060a4dc8 /parse.y
parentd47e0b989fd8d28095af2dc869c6e0932a6c4d85 (diff)
* parse.y (rb_intern3): get rid of type-punning cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 6a0e431083..340a825387 100644
--- a/parse.y
+++ b/parse.y
@@ -9496,6 +9496,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc)
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_intern3(const char *name, long len, rb_encoding *enc)
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;