develooper Front page | perl.perl5.porters | Postings from September 2005

[PATCH] Fix to PERL_DEBUG_COW

Thread Previous | Thread Next
From:
Steve Peters
Date:
September 23, 2005 11:11
Subject:
[PATCH] Fix to PERL_DEBUG_COW
Message ID:
20050923181109.GA1350@mccoy.peters.homeunix.org
Change #25571 has caused the smokes to be broken when building with 
-DPERL_DEBUG_COW.  The following patch fixes the builds.

Steve Peters
steve@fisharerojo.org

--- sv.h.old    2005-09-22 10:02:52.000000000 -0500
+++ sv.h        2005-09-23 13:05:24.000000000 -0500
@@ -887,11 +887,6 @@
 #  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 @@
 #  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)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About