In the code for printing -v, replace longhand newSVpvn() with newSVpvs(), and
Nicholas Clark [Sun, 25 Jan 2009 16:45:04 +0000 (16:45 +0000)]
avoid needing a sv_catpvs().

perl.c

diff --git a/perl.c b/perl.c
index 428df24..f6c3931 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3222,10 +3222,11 @@ Perl_moreswitches(pTHX_ const char *s)
        {
            SV* level= vstringify(PL_patchlevel);
 #ifdef PERL_PATCHNUM
-           SV* num= newSVpvn(PERL_PATCHNUM,sizeof(PERL_PATCHNUM)-1);
-#ifdef PERL_GIT_UNCOMMITTED_CHANGES
-           sv_catpvs(num, "*");
-#endif
+#  ifdef PERL_GIT_UNCOMMITTED_CHANGES
+           SV *num = newSVpvs(PERL_PATCHNUM "*");
+#  else
+           SV *num = newSVpvs(PERL_PATCHNUM);
+#  endif
 
            if (sv_len(num)>=sv_len(level) && strnEQ(SvPV_nolen(num),SvPV_nolen(level),sv_len(level))) {
                SvREFCNT_dec(level);