X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=indirect.xs;h=c89c8b9d0080aee0aec716c668885e640674c65c;hb=574d2ca938e5c479fbc2b24c0f306f7f55e38cc2;hp=ad4a23f4837d288243c6056146d3b75b61abcfb7;hpb=73065691a24f100af6f7fd8055ccca40772f42b2;p=perl%2Fmodules%2Findirect.git diff --git a/indirect.xs b/indirect.xs index ad4a23f..c89c8b9 100644 --- a/indirect.xs +++ b/indirect.xs @@ -203,8 +203,9 @@ STATIC OP *indirect_ck_rv2sv(pTHX_ OP *o) { SV *sv; const char *name = NULL, *s; STRLEN len; + OPCODE type = op->op_type; - switch (op->op_type) { + switch (type) { case OP_GV: case OP_GVSV: { GV *gv = cGVOPx_gv(op); @@ -212,12 +213,12 @@ STATIC OP *indirect_ck_rv2sv(pTHX_ OP *o) { len = GvNAMELEN(gv); break; } - default: { - SV *sv = cSVOPx_sv(op); - if (SvPOK(sv) && (SvTYPE(sv) >= SVt_PV)) - name = SvPV_const(sv, len); - break; - } + default: + if ((PL_opargs[type] & OA_CLASS_MASK) == OA_SVOP) { + SV *sv = cSVOPx_sv(op); + if (SvPOK(sv) && (SvTYPE(sv) >= SVt_PV)) + name = SvPV_const(sv, len); + } } if (!name) goto done;