no need to get shared hash value here
authorRuslan Zakirov <ruz@bestpractical.com>
Fri, 5 Oct 2012 22:30:17 +0000 (02:30 +0400)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 8 Oct 2012 15:49:11 +0000 (08:49 -0700)
hv_common does it later from the keysv. Also,
there are quite a few cases when hash can not
be trusted.

pp_hot.c

index 97af42b..0ea4c66 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1765,7 +1765,6 @@ PP(pp_helem)
     const U32 lval = PL_op->op_flags & OPf_MOD || LVRET;
     const U32 defer = PL_op->op_private & OPpLVAL_DEFER;
     SV *sv;
-    const U32 hash = (SvIsCOW_shared_hash(keysv)) ? SvSHARED_HASH(keysv) : 0;
     const bool localizing = PL_op->op_private & OPpLVAL_INTRO;
     bool preeminent = TRUE;
 
@@ -1784,7 +1783,7 @@ PP(pp_helem)
            preeminent = hv_exists_ent(hv, keysv, 0);
     }
 
-    he = hv_fetch_ent(hv, keysv, lval && !defer, hash);
+    he = hv_fetch_ent(hv, keysv, lval && !defer, 0);
     svp = he ? &HeVAL(he) : NULL;
     if (lval) {
        if (!svp || !*svp || *svp == &PL_sv_undef) {