]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - Magic.xs
Represent nulled COPs as B::COP objects
[perl/modules/Variable-Magic.git] / Magic.xs
index 40b438f831bef3f0d35a5bae6f70960a873f655d..03671cf7ad931059480cca5d1529340e20154e23 100644 (file)
--- 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);