diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-10-06 15:04:53 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-10-06 15:04:53 +0000 |
commit | f92a21223cc4e5d3eeba96e73da58d39e333b778 (patch) | |
tree | 9583631b70b640229780c385e1f361967afcf294 /regcomp.c | |
parent | 881a015edde9e00018b9cadaf8ea296c17cdfc50 (diff) | |
download | perl-f92a21223cc4e5d3eeba96e73da58d39e333b778.tar.gz |
Use the PERL_PV_PRETTY_NOCLEAR flag to simplify the code in
Perl_regprop() for the EXACT node case.
p4raw-id: //depot/perl@32049
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -8805,19 +8805,17 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) k = PL_regkind[OP(o)]; if (k == EXACT) { - SV * const dsv = sv_2mortal(newSVpvs("")); + sv_catpvs(sv, " "); /* Using is_utf8_string() (via PERL_PV_UNI_DETECT) * is a crude hack but it may be the best for now since * we have no flag "this EXACTish node was UTF-8" * --jhi */ - const char * const s = - pv_pretty(dsv, STRING(o), STR_LEN(o), 60, - PL_colors[0], PL_colors[1], - PERL_PV_ESCAPE_UNI_DETECT | - PERL_PV_PRETTY_ELLIPSES | - PERL_PV_PRETTY_LTGT - ); - Perl_sv_catpvf(aTHX_ sv, " %s", s ); + pv_pretty(sv, STRING(o), STR_LEN(o), 60, PL_colors[0], PL_colors[1], + PERL_PV_ESCAPE_UNI_DETECT | + PERL_PV_PRETTY_ELLIPSES | + PERL_PV_PRETTY_LTGT | + PERL_PV_PRETTY_NOCLEAR + ); } else if (k == TRIE) { /* print the details of the trie in dumpuntil instead, as * progi->data isn't available here */ |