diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-10-05 19:48:27 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-10-05 19:48:27 +0000 |
commit | 5e7aa789c35577c2a092ac2f2d75bcee74e9b7f1 (patch) | |
tree | fc741efdbe8431008d864aed677b5905f676d839 /dump.c | |
parent | 85aaa9347a943c63cdf17ef4ee9c73294929e278 (diff) | |
download | perl-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } |