This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_hot.c:padsv: rewrt cmnt for clrty
[perl5.git] / op.h
diff --git a/op.h b/op.h
index 210521e..935e126 100644 (file)
--- a/op.h
+++ b/op.h
@@ -570,7 +570,7 @@ struct loop {
 #  define      cGVOPx_gv(o)    ((GV*)PAD_SVl(cPADOPx(o)->op_padix))
 #  define      IS_PADGV(v)     (v && SvTYPE(v) == SVt_PVGV && isGV_with_GP(v) \
                                 && GvIN_PAD(v))
-#  define      IS_PADCONST(v)  (v && SvREADONLY(v))
+#  define      IS_PADCONST(v)  (v && (SvREADONLY(v) || SvIsCOW(v)))
 #  define      cSVOPx_sv(v)    (cSVOPx(v)->op_sv \
                                 ? cSVOPx(v)->op_sv : PAD_SVl((v)->op_targ))
 #  define      cSVOPx_svp(v)   (cSVOPx(v)->op_sv \