summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-24 11:21:06 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-24 11:21:06 +0000
commit6f58c29fcbfb50c3a72f7728b0d7c12ef3ba840c (patch)
tree27465cb0566cc220f0864b8fa8de0f7fa01cbb03 /sv.h
parent075bae1e6bb463350c47cf60dd2e8641d6833fda (diff)
downloadperl-6f58c29fcbfb50c3a72f7728b0d7c12ef3ba840c.tar.gz
assert that SvMAGIC is never non-NULL for any PVMG used as a pad name.
p4raw-id: //depot/perl@27304
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sv.h b/sv.h
index fdb1fd0a65..5474074ed9 100644
--- a/sv.h
+++ b/sv.h
@@ -1011,6 +1011,8 @@ in gv.h: */
# define SvMAGIC(sv) \
(*({ SV *const _svi = (SV *) sv; \
assert(SvTYPE(_svi) >= SVt_PVMG); \
+ if (SvTYPE(_svi) == SVt_PVMG && (SvFLAGS(_svi) & SVpad_NAME)) \
+ assert (!((XPVMG*) SvANY(_svi))->xmg_magic); \
&(((XPVMG*) SvANY(_svi))->xmg_magic); \
}))
# define SvSTASH(sv) \