summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/pp_hot.c b/pp_hot.c
index e41ee3dacb..6855552f29 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -725,9 +725,6 @@ PP(pp_rv2av)
GV *gv;
if (SvTYPE(sv) != SVt_PVGV) {
- char *sym;
- STRLEN len;
-
if (SvGMAGICAL(sv)) {
mg_get(sv);
if (SvROK(sv))
@@ -745,22 +742,21 @@ PP(pp_rv2av)
}
RETSETUNDEF;
}
- sym = SvPV(sv,len);
if ((PL_op->op_flags & OPf_SPECIAL) &&
!(PL_op->op_flags & OPf_MOD))
{
- gv = (GV*)gv_fetchpv(sym, FALSE, SVt_PVAV);
+ gv = (GV*)gv_fetchsv(sv, FALSE, SVt_PVAV);
if (!gv
- && (!is_gv_magical(sym,len,0)
- || !(gv = (GV*)gv_fetchpv(sym, TRUE, SVt_PVAV))))
+ && (!is_gv_magical_sv(sv,0)
+ || !(gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVAV))))
{
RETSETUNDEF;
}
}
else {
if (PL_op->op_private & HINT_STRICT_REFS)
- DIE(aTHX_ PL_no_symref, sym, "an ARRAY");
- gv = (GV*)gv_fetchpv(sym, TRUE, SVt_PVAV);
+ DIE(aTHX_ PL_no_symref_sv, sv, "an ARRAY");
+ gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVAV);
}
}
else {
@@ -856,9 +852,6 @@ PP(pp_rv2hv)
GV *gv;
if (SvTYPE(sv) != SVt_PVGV) {
- char *sym;
- STRLEN len;
-
if (SvGMAGICAL(sv)) {
mg_get(sv);
if (SvROK(sv))
@@ -876,22 +869,21 @@ PP(pp_rv2hv)
}
RETSETUNDEF;
}
- sym = SvPV(sv,len);
if ((PL_op->op_flags & OPf_SPECIAL) &&
!(PL_op->op_flags & OPf_MOD))
{
- gv = (GV*)gv_fetchpv(sym, FALSE, SVt_PVHV);
+ gv = (GV*)gv_fetchsv(sv, FALSE, SVt_PVHV);
if (!gv
- && (!is_gv_magical(sym,len,0)
- || !(gv = (GV*)gv_fetchpv(sym, TRUE, SVt_PVHV))))
+ && (!is_gv_magical_sv(sv,0)
+ || !(gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVHV))))
{
RETSETUNDEF;
}
}
else {
if (PL_op->op_private & HINT_STRICT_REFS)
- DIE(aTHX_ PL_no_symref, sym, "a HASH");
- gv = (GV*)gv_fetchpv(sym, TRUE, SVt_PVHV);
+ DIE(aTHX_ PL_no_symref_sv, sv, "a HASH");
+ gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVHV);
}
}
else {
@@ -3043,7 +3035,7 @@ S_method_common(pTHX_ SV* meth, U32* hashp)
if (!SvOK(sv) ||
!(packname) ||
- !(iogv = gv_fetchpv(packname, FALSE, SVt_PVIO)) ||
+ !(iogv = gv_fetchsv(sv, FALSE, SVt_PVIO)) ||
!(ob=(SV*)GvIO(iogv)))
{
/* this isn't the name of a filehandle either */