From 885ffcb307023fbe2047bd0c0e016f18bebc1fb3 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 2 May 2006 17:00:56 +0000 Subject: Assert that SvMAGIC() isn't being called on PVMGs which are using the same union to store the stash for our. p4raw-id: //depot/perl@28065 --- sv.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sv.h') diff --git a/sv.h b/sv.h index 71389c9d89..ec6184ba66 100644 --- a/sv.h +++ b/sv.h @@ -1164,6 +1164,8 @@ the scalar's value cannot change unless written to. # define SvMAGIC(sv) \ (*({ SV *const _svi = (SV *) sv; \ assert(SvTYPE(_svi) >= SVt_PVMG); \ + if(SvTYPE(_svi) == SVt_PVMG) \ + assert(!SvPAD_OUR(_svi)); \ &(((XPVMG*) SvANY(_svi))->xmg_u.xmg_magic); \ })) # define SvSTASH(sv) \ -- cgit v1.2.1