diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-24 11:21:06 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-24 11:21:06 +0000 |
commit | 6f58c29fcbfb50c3a72f7728b0d7c12ef3ba840c (patch) | |
tree | 27465cb0566cc220f0864b8fa8de0f7fa01cbb03 /sv.h | |
parent | 075bae1e6bb463350c47cf60dd2e8641d6833fda (diff) | |
download | perl-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) \ |