From: Nicholas Clark Date: Thu, 30 Jun 2005 16:34:52 +0000 (+0000) Subject: Use Perl_sv_catpvf to shorten the code (source and object) needed for X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c5a913da36d66becd2cf3a592f69c87a3e9b51b;p=p5sagit%2Fp5-mst-13.2.git Use Perl_sv_catpvf to shorten the code (source and object) needed for commandline -V options that q\0...\0. p4raw-id: //depot/perl@25026 --- diff --git a/perl.c b/perl.c index 5b3b777..f67d749 100644 --- a/perl.c +++ b/perl.c @@ -2929,9 +2929,7 @@ Perl_moreswitches(pTHX_ char *s) sv_catpv(sv, start); else { sv_catpvn(sv, start, s-start); - sv_catpv(sv, " split(/,/,q{"); - sv_catpv(sv, ++s); - sv_catpv(sv, "})"); + Perl_sv_catpvf(aTHX_ sv, " split(/,/,q%c%s%c)", 0, ++s, 0); } s += strlen(s); my_setenv("PERL5DB", SvPV_nolen_const(sv)); @@ -3039,9 +3037,7 @@ Perl_moreswitches(pTHX_ char *s) sv_catpvn(sv, start, s-start); } if (*s == '=') { - sv_catpvn(sv, " split(/,/,q\0", 13); - sv_catpv(sv, s+1); - sv_catpvn(sv, "\0)", 2); + Perl_sv_catpvf(aTHX_ sv, " split(/,/,q%c%s%c)", 0, ++s, 0); s+=strlen(s); } else if (*s != '\0') {