From: Nicholas Clark Date: Sat, 6 Oct 2007 12:22:58 +0000 (+0000) Subject: Directly create the SV with Perl_newSVpvf() rather than using X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=550e2ce03d201c2e16d6755c5e8b7feb3b2afe06;p=p5sagit%2Fp5-mst-13.2.git Directly create the SV with Perl_newSVpvf() rather than using Perl_catSVpvf() to extend a zero-length SV. p4raw-id: //depot/perl@32042 --- diff --git a/perlio.c b/perlio.c index bbb12db..7c0abfc 100644 --- a/perlio.c +++ b/perlio.c @@ -507,9 +507,8 @@ PerlIO_debug(const char *fmt, ...) #else const char *s = CopFILE(PL_curcop); STRLEN len; - SV * const sv = newSVpvs(""); - Perl_sv_catpvf(aTHX_ sv, "%s:%" IVdf " ", s ? s : "(none)", - (IV) CopLINE(PL_curcop)); + SV * const sv = Perl_newSVpvf(aTHX_ "%s:%" IVdf " ", s ? s : "(none)", + (IV) CopLINE(PL_curcop)); Perl_sv_vcatpvf(aTHX_ sv, fmt, &ap); s = SvPV_const(sv, len);