From: Nicholas Clark Date: Sun, 25 Jan 2009 16:45:04 +0000 (+0000) Subject: In the code for printing -v, replace longhand newSVpvn() with newSVpvs(), and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=23d483e2ac9eec5dd3415b4d8aad7ec7b0551ead;p=p5sagit%2Fp5-mst-13.2.git In the code for printing -v, replace longhand newSVpvn() with newSVpvs(), and avoid needing a sv_catpvs(). --- diff --git a/perl.c b/perl.c index 428df24..f6c3931 100644 --- 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);