summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-05-02 09:30:40 +0100
committerRicardo Signes <rjbs@cpan.org>2016-05-03 11:23:02 -0400
commit6bbd724fb7623fb05df66ca5ed83a09511903521 (patch)
tree72f0d000c336e3b544863f3ae789cf85a3777782 /sv.h
parente7fffa3be94db01251c8c3471685a1818acbcdc5 (diff)
downloadperl-6bbd724fb7623fb05df66ca5ed83a09511903521.tar.gz
Revert "More generalized fix for #127855"
This reverts commit bcc9f606509ad2fad50e16f081103451b7dc49e1. This and the next commit revert the two commits that were an original fix for RT #127855, but which is fixed in a different way in a following commit. See the ticket for more details.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/sv.h b/sv.h
index 0c6e6d49b1..bfda6bf6cb 100644
--- a/sv.h
+++ b/sv.h
@@ -2111,15 +2111,12 @@ See also C<L</PL_sv_yes>> and C<L</PL_sv_no>>.
#ifdef PERL_ANY_COW
# define SvGROW(sv,len) \
- (SvIsCOW(sv) || SvLEN(sv) < ((len)+2) ? sv_grow(sv,(len)+2) : SvPVX(sv))
-# define SvGROW_mutable(sv,len) \
- (SvLEN(sv) < ((len)+2) ? sv_grow(sv,(len)+2) : SvPVX_mutable(sv))
+ (SvIsCOW(sv) || SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv))
#else
-# define SvGROW(sv,len) \
- (SvLEN(sv) < ((len)+1) ? sv_grow(sv,(len)+1) : SvPVX(sv))
-# define SvGROW_mutable(sv,len) \
- (SvLEN(sv) < ((len)+1) ? sv_grow(sv,(len)+1) : SvPVX_mutable(sv))
+# define SvGROW(sv,len) (SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv))
#endif
+#define SvGROW_mutable(sv,len) \
+ (SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX_mutable(sv))
#define Sv_Grow sv_grow
#define CLONEf_COPY_STACKS 1