More efficient API choices for string appending.
authorNicholas Clark <nick@ccl4.org>
Wed, 31 Dec 2008 07:32:42 +0000 (07:32 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 30 Mar 2009 19:17:51 +0000 (20:17 +0100)
(cherry picked from commit d0a9311f604aa78fbd7b7284f993900eeb0c2a7e)

perl.c

diff --git a/perl.c b/perl.c
index aff5d32..f319466 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3344,14 +3344,14 @@ Perl_moreswitches(pTHX_ const char *s)
 #ifdef PERL_PATCHNUM
            SV* num= newSVpvn(STRINGIFY(PERL_PATCHNUM),sizeof(STRINGIFY(PERL_PATCHNUM))-1);
 #ifdef PERL_GIT_UNCOMMITTED_CHANGES
-           Perl_sv_catpvf(aTHX_ num,"%s","*");
+           sv_catpvs(num, "*");
 #endif
 
            if (sv_len(num)>=sv_len(level) && strnEQ(SvPV_nolen(num),SvPV_nolen(level),sv_len(level))) {
                SvREFCNT_dec(level);
                level= num;
            } else {
-               Perl_sv_catpvf(aTHX_ level, " (%s)",SvPV_nolen(num));
+               Perl_sv_catpvf(aTHX_ level, " (%"SVf")", num);
                SvREFCNT_dec(num);
            }
  #endif