diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-11-13 18:47:27 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-11-13 18:47:27 +0000 |
commit | 06c0cc96ebd866767a6d107ed78967600f7e0395 (patch) | |
tree | 1ebb88815a5ae73c7218f8ed3732983b731433a6 /sv.h | |
parent | 678f9f8e69283f64dcdcd30e3fe602110d10a5a6 (diff) | |
download | perl-06c0cc96ebd866767a6d107ed78967600f7e0395.tar.gz |
Fix breakages that prevended -DPERL_POISON from compiling.
p4raw-id: //depot/perl@26112
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -896,10 +896,17 @@ in gv.h: */ # endif #endif +#ifndef PERL_POISON /* 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 SvPVX_mutable(sv) (0 + (sv)->sv_u.svu_pv) +# define SvPVX_const(sv) ((const char*)(0 + (sv)->sv_u.svu_pv)) +#else +/* Except for the poison code, which uses & to scribble over the pointer after + free() is called. */ +# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv) +# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) +#endif #define SvIVXx(sv) SvIVX(sv) #define SvUVXx(sv) SvUVX(sv) |