The old COW code needs to use SvPVX_mutable when doing copy-on-write.
[p5sagit/p5-mst-13.2.git] / warnings.pl
index e3c0403..9967175 100644 (file)
@@ -325,8 +325,8 @@ print WARN <<'EOM';
 #define isLEXWARN_on   (PL_curcop->cop_warnings != pWARN_STD)
 #define isLEXWARN_off  (PL_curcop->cop_warnings == pWARN_STD)
 #define isWARN_ONCE    (PL_dowarn & (G_WARN_ON|G_WARN_ONCE))
-#define isWARN_on(c,x) (IsSet(SvPVX(c), 2*(x)))
-#define isWARNf_on(c,x)        (IsSet(SvPVX(c), 2*(x)+1))
+#define isWARN_on(c,x) (IsSet(SvPVX_const(c), 2*(x)))
+#define isWARNf_on(c,x)        (IsSet(SvPVX_const(c), 2*(x)+1))
 
 #define ckWARN(x)                                                      \
        ( (isLEXWARN_on && PL_curcop->cop_warnings != pWARN_NONE &&     \