diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-24 19:32:11 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-24 19:32:11 +0000 |
commit | 064cf52948e2ac0b1b809d55fe1b456a0b0fa4c4 (patch) | |
tree | d8bf87aad337091a0db535b3c109f1c77b857e62 /sv.h | |
parent | 2892acdbbc776bf121eaec9d93ea404f7afc54b8 (diff) | |
download | perl-064cf52948e2ac0b1b809d55fe1b456a0b0fa4c4.tar.gz |
Avoid special case SvMAGIC macros just to cope with Perl_sv_unmagic.
p4raw-id: //depot/perl@27319
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -990,20 +990,11 @@ in gv.h: */ # define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur) # ifdef DEBUGGING -# ifdef PERL_IN_SV_C -/* Can't make this RVALUE because of Perl_sv_unmagic. */ -# define SvMAGIC(sv) (*(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_u.xmg_magic)) -# else -# define SvMAGIC(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_u.xmg_magic)) -# endif -# define SvSTASH(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_stash)) +# define SvMAGIC(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_u.xmg_magic)) +# define SvSTASH(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_stash)) # else -# ifdef PERL_IN_SV_C -# define SvMAGIC(sv) ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic -# else -# define SvMAGIC(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic) -# endif -# define SvSTASH(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_stash) +# define SvMAGIC(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic) +# define SvSTASH(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_stash) # endif #else # define SvPVX(sv) ((sv)->sv_u.svu_pv) |