This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid using *pvf functions when the format string is a fixed string.
authorNicholas Clark <nick@ccl4.org>
Sat, 6 Oct 2007 12:23:15 +0000 (12:23 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 6 Oct 2007 12:23:15 +0000 (12:23 +0000)
p4raw-id: //depot/perl@32043

dump.c
regcomp.c

diff --git a/dump.c b/dump.c
index 0d7fd34..1ad3e77 100644 (file)
--- 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, "&lt;");
+           sv_catpvs(dsv, "&lt;");
            break;
        case '>':
-           Perl_sv_catpvf(aTHX_ dsv, "&gt;");
+           sv_catpvs(dsv, "&gt;");
            break;
        case '&':
-           Perl_sv_catpvf(aTHX_ dsv, "&amp;");
+           sv_catpvs(dsv, "&amp;");
            break;
        case '"':
-           Perl_sv_catpvf(aTHX_ dsv, "&#34;");
+           sv_catpvf(dsv, "&#34;");
            break;
        default:
            if (c < 0xD800) {
index f649188..2af7958 100644 (file)
--- 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) {