summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-27 22:39:45 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-27 22:39:45 +0000
commite9726144eab9da5d0ccdc0c6f4308a69bed719ee (patch)
treedd9c0688f2040a13d8915bcd1353b8b876a5848c /sv.h
parentf065df047b3b91cdea02a1ecce8f0c0e9045d9de (diff)
downloadperl-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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.h b/sv.h
index 964dae0212..2722083b78 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)) \