summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJoshua Pritikin <joshua.pritikin@db.com>1998-06-15 06:03:37 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-20 23:47:09 +0000
commit800e9ae0504a9c74de77c7ab0037cc96b5df4995 (patch)
tree118b9d18a389b7dadbbf626bb92876116df977c5 /pp.c
parent270d1e3932d8fd3e603e87df650a603bf9eefa79 (diff)
downloadperl-800e9ae0504a9c74de77c7ab0037cc96b5df4995.tar.gz
added patch, tweaked missed files, excised comment that doesn't really
belong in the sources Message-Id: <H00000e500072c63@MHS> Subject: [PATCH 5.004_57] tied hash slice & do_kv cleanup p4raw-id: //depot/perl@1165
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pp.c b/pp.c
index aeaca4c607..7d51e49206 100644
--- a/pp.c
+++ b/pp.c
@@ -2418,7 +2418,6 @@ PP(pp_exists)
PP(pp_hslice)
{
djSP; dMARK; dORIGMARK;
- register HE *he;
register HV *hv = (HV*)POPs;
register I32 lval = op->op_flags & OPf_MOD;
I32 realhv = (SvTYPE(hv) == SVt_PVHV);
@@ -2428,18 +2427,18 @@ PP(pp_hslice)
SV *keysv = *MARK;
SV **svp;
if (realhv) {
- he = hv_fetch_ent(hv, keysv, lval, 0);
+ HE *he = hv_fetch_ent(hv, keysv, lval, 0);
svp = he ? &HeVAL(he) : 0;
} else {
svp = avhv_fetch_ent((AV*)hv, keysv, lval, 0);
}
if (lval) {
- if (!he || HeVAL(he) == &sv_undef)
+ if (!svp || *svp == &sv_undef)
DIE(no_helem, SvPV(keysv, na));
if (op->op_private & OPpLVAL_INTRO)
- save_helem(hv, keysv, &HeVAL(he));
+ save_helem(hv, keysv, svp);
}
- *MARK = he ? HeVAL(he) : &sv_undef;
+ *MARK = svp ? *svp : &sv_undef;
}
}
if (GIMME != G_ARRAY) {