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 /utf8.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 'utf8.c')
-rw-r--r-- | utf8.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2167,12 +2167,14 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV f default: break; } if (ok) { - Perl_sv_catpvf(aTHX_ dsv, "\\%c", ok); + const unsigned char string = (unsigned char) ok; + sv_catpvn(dsv, &string, 1); } } /* isPRINT() is the locale-blind version. */ if (!ok && (flags & UNI_DISPLAY_ISPRINT) && isPRINT(c)) { - Perl_sv_catpvf(aTHX_ dsv, "%c", c); + const unsigned char string = (unsigned char) c; + sv_catpvn(dsv, &string, 1); ok = 1; } } |