From 03687789a91f025434d009c94c44b46adf44f605 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 21 Apr 2005 13:55:47 -0500 Subject: bytecode.pl, bytecode.h, and sv.h fixes Message-ID: <20050421235547.GA12149@mccoy.peters.homeunix.org> p4raw-id: //depot/perl@24277 --- sv.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'sv.h') diff --git a/sv.h b/sv.h index 940355e977..cf71f03430 100644 --- a/sv.h +++ b/sv.h @@ -750,14 +750,22 @@ in gv.h: */ #define SvLEN(sv) (0 + ((XPV*) SvANY(sv))->xpv_len) #define SvEND(sv) (((XPV*) SvANY(sv))->xpv_pv + ((XPV*)SvANY(sv))->xpv_cur) -#ifdef PERL_IN_SV_C +#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_magic)) +# define SvMAGIC(sv) (*(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_magic)) +# else +# define SvMAGIC(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_magic)) +# endif +#define SvSTASH(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_stash)) #else -#define SvMAGIC(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_magic)) +# ifdef PERL_IN_SV_C +# define SvMAGIC(sv) ((XPVMG*) SvANY(sv))->xmg_magic +# else +# define SvMAGIC(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_magic) +# endif +#define SvSTASH(sv) (0 + ((XPVMG*) SvANY(sv))->xmg_stash) #endif -#define SvSTASH(sv) (0 + *(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_stash)) - #else #define SvIVX(sv) ((XPVIV*) SvANY(sv))->xiv_iv #define SvUVX(sv) ((XPVUV*) SvANY(sv))->xuv_uv -- cgit v1.2.1