From: Steve Peters Date: Fri, 23 Sep 2005 20:11:00 +0000 (+0000) Subject: Fix to PERL_DEBUG_COW X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb4968450a032ce005616de0476d6d89662526ad;p=p5sagit%2Fp5-mst-13.2.git Fix to PERL_DEBUG_COW Message-ID: <20050923181109.GA1350@mccoy.peters.homeunix.org> p4raw-id: //depot/perl@25590 --- diff --git a/sv.h b/sv.h index 77731c4..1e6c86a 100644 --- a/sv.h +++ b/sv.h @@ -887,11 +887,6 @@ in gv.h: */ # define SvLEN(sv) ((XPV*) SvANY(sv))->xpv_len # define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur) -/* Given that these two are new, there can't be any existing code using them - * as LVALUEs */ -#define SvPVX_mutable(sv) (0 + (sv)->sv_u.svu_pv) -#define SvPVX_const(sv) ((const char*)(0 + (sv)->sv_u.svu_pv)) - # ifdef DEBUGGING # define SvMAGIC(sv) (*(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_magic)) # define SvSTASH(sv) (*(assert(SvTYPE(sv) >= SVt_PVMG), &((XPVMG*) SvANY(sv))->xmg_stash)) @@ -901,6 +896,11 @@ in gv.h: */ # endif #endif +/* Given that these two are new, there can't be any existing code using them + * as LVALUEs */ +#define SvPVX_mutable(sv) (0 + (sv)->sv_u.svu_pv) +#define SvPVX_const(sv) ((const char*)(0 + (sv)->sv_u.svu_pv)) + #define SvIVXx(sv) SvIVX(sv) #define SvUVXx(sv) SvUVX(sv) #define SvNVXx(sv) SvNVX(sv)