This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use vnewSVpvf() rather than sv_vcatpvf() onto a newly created empty
authorNicholas Clark <nick@ccl4.org>
Sat, 6 Oct 2007 12:54:32 +0000 (12:54 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 6 Oct 2007 12:54:32 +0000 (12:54 +0000)
string.

p4raw-id: //depot/perl@32044

perlio.c

index 7c0abfc..2ea86aa 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -5035,16 +5035,16 @@ int
 PerlIO_vprintf(PerlIO *f, const char *fmt, va_list ap)
 {
     dTHX;
-    SV * const sv = newSVpvs("");
+    SV * sv;
     const char *s;
     STRLEN len;
     SSize_t wrote;
 #ifdef NEED_VA_COPY
     va_list apc;
     Perl_va_copy(ap, apc);
-    sv_vcatpvf(sv, fmt, &apc);
+    sv = vnewSVpvf(fmt, &apc);
 #else
-    sv_vcatpvf(sv, fmt, &ap);
+    sv = vnewSVpvf(fmt, &ap);
 #endif
     s = SvPV_const(sv, len);
     wrote = PerlIO_write(f, s, len);