aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-10 00:41:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-10 00:41:21 +0000
commitcf6d0c40a853e94e0707462de5535cb8649a4427 (patch)
treee4ede4325138610b0ebc2ce158c8ff9eb704ebbe /hash.c
parentd1aef8761d5cd0526f10d34981497d6b5ac69145 (diff)
downloadruby-cf6d0c40a853e94e0707462de5535cb8649a4427.tar.gz
hash.c: prefer value cast to pointer cast
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index 0514c852a9..099a62deaf 100644
--- a/hash.c
+++ b/hash.c
@@ -1520,15 +1520,15 @@ static int
hash_aset_str(st_data_t *key, st_data_t *val, struct update_arg *arg, int existing)
{
if (!existing && !RB_OBJ_FROZEN(*key)) {
- VALUE fstr;
+ st_data_t fstr;
st_table *tbl = rb_vm_fstring_table();
- if (st_lookup(tbl, *key, (st_data_t *)&fstr)) {
+ if (st_lookup(tbl, *key, &fstr)) {
if (rb_objspace_garbage_object_p(fstr)) {
*key = rb_fstring(*key);
}
else {
- *key = fstr;
+ *key = (VALUE)fstr;
}
}
else {