From: Nicholas Clark Date: Sat, 6 Oct 2007 12:23:15 +0000 (+0000) Subject: Avoid using *pvf functions when the format string is a fixed string. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3a2811a943652950bfdb6408b09c32b4bf531d0;p=p5sagit%2Fp5-mst-13.2.git Avoid using *pvf functions when the format string is a fixed string. p4raw-id: //depot/perl@32043 --- diff --git a/dump.c b/dump.c index 0d7fd34..1ad3e77 100644 --- a/dump.c +++ b/dump.c @@ -2234,16 +2234,16 @@ Perl_sv_catxmlpvn(pTHX_ SV *dsv, const char *pv, STRLEN len, int utf8) Perl_sv_catpvf(aTHX_ dsv, "STUPIDXML(#x%X)", c); break; case '<': - Perl_sv_catpvf(aTHX_ dsv, "<"); + sv_catpvs(dsv, "<"); break; case '>': - Perl_sv_catpvf(aTHX_ dsv, ">"); + sv_catpvs(dsv, ">"); break; case '&': - Perl_sv_catpvf(aTHX_ dsv, "&"); + sv_catpvs(dsv, "&"); break; case '"': - Perl_sv_catpvf(aTHX_ dsv, """); + sv_catpvf(dsv, """); break; default: if (c < 0xD800) { diff --git a/regcomp.c b/regcomp.c index f649188..2af7958 100644 --- a/regcomp.c +++ b/regcomp.c @@ -8846,7 +8846,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) int i; int rangestart = -1; U8* bitmap = IS_ANYOF_TRIE(op) ? (U8*)ANYOF_BITMAP(o) : (U8*)TRIE_BITMAP(trie); - Perl_sv_catpvf(aTHX_ sv, "["); + sv_catpvs(sv, "["); for (i = 0; i <= 256; i++) { if (i < 256 && BITMAP_TEST(bitmap,i)) { if (rangestart == -1) @@ -8863,7 +8863,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) rangestart = -1; } } - Perl_sv_catpvf(aTHX_ sv, "]"); + sv_catpvs(sv, "]"); } } else if (k == CURLY) {