From: Vincent Pit Date: Fri, 25 Sep 2015 10:09:04 +0000 (+0200) Subject: Represent nulled COPs as B::COP objects X-Git-Tag: rt107294~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=5663aeb8fcd42b77a62b817fd2070dada1bd56ce Represent nulled COPs as B::COP objects This change was added to the core B.xs in commit 619dadb5, which was made public in perl 5.21.7. It is pretty unlikely that magic will ever be called for these nulled ops, but it is better to keep our chunk of B.xs in sync with the core. --- diff --git a/Magic.xs b/Magic.xs index 40b438f..03671cf 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);