Correct SvVALID() and SvTAIL() - they are actually const.
Nicholas Clark [Mon, 27 Oct 2008 22:39:45 +0000 (22:39 +0000)]
p4raw-id: //depot/perl@34613

sv.h

diff --git a/sv.h b/sv.h
index 964dae0..2722083 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -965,7 +965,7 @@ the scalar's value cannot change unless written to.
 #define SvEVALED_off(sv)       (SvFLAGS(sv) &= ~SVrepl_EVAL)
 
 #if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
-#  define SvVALID(sv)          ({ SV *const _svvalid = MUTABLE_SV(sv); \
+#  define SvVALID(sv)          ({ const SV *const _svvalid = (const SV*)(sv); \
                                   if (SvFLAGS(_svvalid) & SVpbm_VALID) \
                                       assert(!isGV_with_GP(_svvalid)); \
                                   (SvFLAGS(_svvalid) & SVpbm_VALID);   \
@@ -979,7 +979,7 @@ the scalar's value cannot change unless written to.
                                   (SvFLAGS(_svvalid) &= ~SVpbm_VALID); \
                                })
 
-#  define SvTAIL(sv)   ({ SV *const _svtail = MUTABLE_SV(sv);          \
+#  define SvTAIL(sv)   ({ const SV *const _svtail = (const SV *)(sv);  \
                            assert(SvTYPE(_svtail) != SVt_PVAV);                \
                            assert(SvTYPE(_svtail) != SVt_PVHV);                \
                            (SvFLAGS(sv) & (SVpbm_TAIL|SVpbm_VALID))    \