summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorFather Chrysostomos (via RT) <perlbug-followup@perl.org>2010-01-17 14:32:24 -0800
committerDavid Mitchell <davem@iabyn.com>2010-05-25 12:44:16 +0100
commitbb1bc619ea68d9703fbd3fe5bc65ae000f90151f (patch)
tree64b580d9b4866d7532b1e7050147e511baccb88a /pp_hot.c
parent6a5f8cbd14b4a44b35830907e944f1af0caeea90 (diff)
downloadperl-bb1bc619ea68d9703fbd3fe5bc65ae000f90151f.tar.gz
Deref ops ignore get-magic when SvROK(sv)
This is just like bug 68192, except in this case it’s a different set of operators that have had this problem for much longer.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/pp_hot.c b/pp_hot.c
index ea24062bc5..d5c13fecd9 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -820,8 +820,8 @@ PP(pp_rv2av)
const bool is_pp_rv2av = PL_op->op_type == OP_RV2AV;
const svtype type = is_pp_rv2av ? SVt_PVAV : SVt_PVHV;
+ SvGETMAGIC(sv);
if (SvROK(sv)) {
- wasref:
tryAMAGICunDEREF_var(is_pp_rv2av ? to_av_amg : to_hv_amg);
sv = SvRV(sv);
@@ -858,11 +858,6 @@ PP(pp_rv2av)
GV *gv;
if (!isGV_with_GP(sv)) {
- if (SvGMAGICAL(sv)) {
- mg_get(sv);
- if (SvROK(sv))
- goto wasref;
- }
gv = Perl_softref2xv(aTHX_ sv, is_pp_rv2av ? an_array : a_hash,
type, &sp);
if (!gv)