diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-10-27 22:39:45 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-10-27 22:39:45 +0000 |
commit | e9726144eab9da5d0ccdc0c6f4308a69bed719ee (patch) | |
tree | dd9c0688f2040a13d8915bcd1353b8b876a5848c /sv.h | |
parent | f065df047b3b91cdea02a1ecce8f0c0e9045d9de (diff) | |
download | perl-e9726144eab9da5d0ccdc0c6f4308a69bed719ee.tar.gz |
Correct SvVALID() and SvTAIL() - they are actually const.
p4raw-id: //depot/perl@34613
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) \ |