From: Nicholas Clark Date: Mon, 27 Oct 2008 22:39:45 +0000 (+0000) Subject: Correct SvVALID() and SvTAIL() - they are actually const. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e9726144eab9da5d0ccdc0c6f4308a69bed719ee;p=p5sagit%2Fp5-mst-13.2.git Correct SvVALID() and SvTAIL() - they are actually const. p4raw-id: //depot/perl@34613 --- diff --git a/sv.h b/sv.h index 964dae0..2722083 100644 --- 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)) \