diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-05-25 21:19:38 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-05-25 21:19:38 +0000 |
commit | 97fcbf9696d4cdc3d47f383b99d9840ccb39c616 (patch) | |
tree | db7f5a92355aa3402f174a0065ca2542147c15ee /pp.c | |
parent | ae77835f9b08444f73b593d4cdc0758132dbbf00 (diff) | |
download | perl-97fcbf9696d4cdc3d47f383b99d9840ccb39c616.tar.gz |
Fix up integration 5.003->5.004.
p4raw-id: //depot/perl@19
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -2131,8 +2131,9 @@ PP(pp_delete) if (op->op_private & OPpSLICE) { dMARK; dORIGMARK; + U32 hvtype; hv = (HV*)POPs; - U32 hvtype = SvTYPE(hv); + hvtype = SvTYPE(hv); while (++MARK <= SP) { if (hvtype == SVt_PVHV) sv = hv_delete_ent(hv, *MARK, discard, 0); @@ -2153,9 +2154,12 @@ PP(pp_delete) else { SV *keysv = POPs; hv = (HV*)POPs; - if (SvTYPE(hv) != SVt_PVHV) + if (SvTYPE(hv) == SVt_PVHV) + sv = hv_delete_ent(hv, keysv, discard, 0); + else if (SvTYPE(hv) == SVt_PVAV) + sv = avhv_delete_ent((AV*)hv, keysv, discard, 0); + else DIE("Not a HASH reference"); - sv = hv_delete_ent(hv, keysv, discard, 0); if (!sv) sv = &sv_undef; if (!discard) @@ -2197,7 +2201,7 @@ PP(pp_hslice) he = hv_fetch_ent(hv, keysv, lval, 0); svp = he ? &HeVAL(he) : 0; } else { - svp = avhv_fetch_ent((AV*)hv, keysv, lval); + svp = avhv_fetch_ent((AV*)hv, keysv, lval, 0); } if (lval) { if (!he || HeVAL(he) == &sv_undef) |