X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Magic.xs;h=d579f9ee0e0f4ed31666cc4f9ba9f17add425c0a;hb=05fcc00b2495acf1caa47a7f5290fcafe16b7765;hp=40b438f831bef3f0d35a5bae6f70960a873f655d;hpb=7afdaf8f49acc22b13ccfcee9bc03045d0a88036;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/Magic.xs b/Magic.xs index 40b438f..d579f9e 100644 --- a/Magic.xs +++ b/Magic.xs @@ -426,8 +426,13 @@ static opclass vmg_opclass(const OP *o) { return OPc_NULL; #endif - if (o->op_type == 0) + if (o->op_type == 0) { +#if VMG_HAS_PERL(5, 21, 7) + if (o->op_targ == OP_NEXTSTATE || o->op_targ == OP_DBSTATE) + return OPc_COP; +#endif return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP; + } if (o->op_type == OP_SASSIGN) return ((o->op_private & OPpASSIGN_BACKWARDS) ? OPc_UNOP : OPc_BINOP); @@ -468,7 +473,12 @@ static opclass vmg_opclass(const OP *o) { case OA_PADOP: return OPc_PADOP; case OA_PVOP_OR_SVOP: - return (o->op_private & (OPpTRANS_TO_UTF|OPpTRANS_FROM_UTF)) ? OPc_SVOP : OPc_PVOP; + return (o->op_private & (OPpTRANS_TO_UTF|OPpTRANS_FROM_UTF)) +#if defined(USE_ITHREADS) && VMG_HAS_PERL(5, 8, 9) + ? OPc_PADOP : OPc_PVOP; +#else + ? OPc_SVOP : OPc_PVOP; +#endif case OA_LOOP: return OPc_LOOP; case OA_COP: