summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-10-05 19:48:27 +0000
committerNicholas Clark <nick@ccl4.org>2007-10-05 19:48:27 +0000
commit5e7aa789c35577c2a092ac2f2d75bcee74e9b7f1 (patch)
treefc741efdbe8431008d864aed677b5905f676d839 /dump.c
parent85aaa9347a943c63cdf17ef4ee9c73294929e278 (diff)
downloadperl-5e7aa789c35577c2a092ac2f2d75bcee74e9b7f1.tar.gz
Eliminate most *printf-like calls that use a simple "%c" format,
replacing them with constructions that are more efficient because they avoid the overhead of the *printf format parser and interpreter code. p4raw-id: //depot/perl@32034
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index dce863098c..bdaf41a0a5 100644
--- a/dump.c
+++ b/dump.c
@@ -279,7 +279,8 @@ Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
sv_catpvn(dsv, octbuf, chsize);
wrote += chsize;
} else {
- Perl_sv_catpvf( aTHX_ dsv, "%c", c);
+ const char string = (char) c;
+ sv_catpvn(dsv, &string, 1);
wrote++;
}
if ( flags & PERL_PV_ESCAPE_FIRSTCHAR )
@@ -2243,7 +2244,8 @@ Perl_sv_catxmlpvn(pTHX_ SV *dsv, const char *pv, STRLEN len, int utf8)
Perl_sv_catpvf(aTHX_ dsv, "&#x%X;", c);
}
else {
- Perl_sv_catpvf(aTHX_ dsv, "%c", c);
+ const char string = (char) c;
+ sv_catpvn(dsv, &string, 1);
}
break;
}