From: Nicholas Clark Date: Sun, 16 Apr 2006 13:25:18 +0000 (+0000) Subject: Perl_do_vop can profitably use Perl_sv_usepvn_flags, as it has X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa0a69cb4bc6ac8103067b4dd5c2d09748f9d78d;p=p5sagit%2Fp5-mst-13.2.git Perl_do_vop can profitably use Perl_sv_usepvn_flags, as it has allocated space for an initialised a trailing NUL. p4raw-id: //depot/perl@27843 --- diff --git a/doop.c b/doop.c index cfc67cb..5972dbd 100644 --- a/doop.c +++ b/doop.c @@ -1214,7 +1214,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) needlen = ((optype == OP_BIT_AND) ? len : (leftlen > rightlen ? leftlen : rightlen)); Newxz(dc, needlen + 1, char); - (void)sv_usepvn(sv, dc, needlen); + sv_usepvn_flags(sv, dc, needlen, SV_HAS_TRAILING_NUL); dc = SvPVX(sv); /* sv_usepvn() calls Renew() */ } SvCUR_set(sv, len);