From: Nicholas Clark Date: Fri, 24 Feb 2006 11:21:06 +0000 (+0000) Subject: assert that SvMAGIC is never non-NULL for any PVMG used as a pad name. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6f58c29fcbfb50c3a72f7728b0d7c12ef3ba840c;p=p5sagit%2Fp5-mst-13.2.git assert that SvMAGIC is never non-NULL for any PVMG used as a pad name. p4raw-id: //depot/perl@27304 --- diff --git a/sv.h b/sv.h index fdb1fd0..5474074 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) \