ruby-changes:47191
From: nobu <ko1@a...>
Date: Mon, 10 Jul 2017 09:41:27 +0900 (JST)
Subject: [ruby-changes:47191] nobu:r59306 (trunk): hash.c: prefer value cast to pointer cast
nobu 2017-07-10 09:41:21 +0900 (Mon, 10 Jul 2017) New Revision: 59306 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59306 Log: hash.c: prefer value cast to pointer cast Modified files: trunk/hash.c Index: hash.c =================================================================== --- hash.c (revision 59305) +++ hash.c (revision 59306) @@ -1520,15 +1520,15 @@ static int https://github.com/ruby/ruby/blob/trunk/hash.c#L1520 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 { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/