summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-09-13 22:22:29 +0200
committerNicholas Clark <nick@ccl4.org>2012-09-14 08:34:18 +0200
commita341814904f870ae50cc3ebaec8967e9fc103b66 (patch)
treecbd89509e62d1f7ea936c24d79a15500d050433c
parent6c31ff7434088c8eb1fd81ffe6b039a372bd9fc7 (diff)
downloadperl-a341814904f870ae50cc3ebaec8967e9fc103b66.tar.gz
Fix compilation for -DPERL_POISON and -DPERL_OLD_COPY_ON_WRITE together.
These have been present since PERL_POISON was added in June 2005 by commit 94010e71b67db040. It seems that no-one has tried compiling with both defined together.
-rw-r--r--sv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index acb66df472..a9ef38cf80 100644
--- a/sv.c
+++ b/sv.c
@@ -4356,7 +4356,7 @@ Perl_sv_setsv_cow(pTHX_ SV *dstr, SV *sstr)
if (SvTHINKFIRST(dstr))
sv_force_normal_flags(dstr, SV_COW_DROP_PV);
else if (SvPVX_const(dstr))
- Safefree(SvPVX_const(dstr));
+ Safefree(SvPVX_mutable(dstr));
}
else
new_SV(dstr);
@@ -6160,7 +6160,7 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
SvFAKE_off(sv);
} else if (SvLEN(sv)) {
- Safefree(SvPVX_const(sv));
+ Safefree(SvPVX_mutable(sv));
}
}
#else