summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2006-11-19 06:41:53 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-20 13:36:10 +0000
commitde734bd5c0f518849c823cf9035c5583d1cd8d67 (patch)
treeea13ce1eed700b19d0936200039a3b92b2e768d8 /regexec.c
parent8c823cd6ff89c1e53ff20884d165110a554717d9 (diff)
downloadperl-de734bd5c0f518849c823cf9035c5583d1cd8d67.tar.gz
Patch by Yves Orton to fix the regression reported in :
Subject: 28325/6 break DateTime::Format::Strptime Message-ID: <877ixs6oa6.fsf@k75.linux.bogus> p4raw-id: //depot/perl@29324
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index 8abe220b19..e505fb4bd7 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2935,11 +2935,17 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
= (reg_trie_data*)rex->data->data[ ARG(ST.me) ];
SV ** const tmp = av_fetch( trie->words,
ST.accept_buff[ 0 ].wordnum-1, 0 );
+ SV *sv= tmp ? sv_newmortal() : NULL;
+
PerlIO_printf( Perl_debug_log,
"%*s %sonly one match left: #%d <%s>%s\n",
REPORT_CODE_OFF+depth*2, "", PL_colors[4],
ST.accept_buff[ 0 ].wordnum,
- tmp ? SvPV_nolen_const( *tmp ) : "not compiled under -Dr",
+ tmp ? pv_pretty(sv, SvPV_nolen_const(*tmp), SvCUR(*tmp), 0,
+ PL_colors[0], PL_colors[1],
+ (SvUTF8(*tmp) ? PERL_PV_ESCAPE_UNI : 0)
+ )
+ : "not compiled under -Dr",
PL_colors[5] );
});
PL_reginput = (char *)ST.accept_buff[ 0 ].endpos;
@@ -3013,11 +3019,16 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
regnode *nextop=(!ST.jump || !ST.jump[ST.accept_buff[best].wordnum]) ?
ST.B :
ST.me + ST.jump[ST.accept_buff[best].wordnum];
+ SV *sv= tmp ? sv_newmortal() : NULL;
+
PerlIO_printf( Perl_debug_log,
"%*s %strying alternation #%d <%s> at node #%d %s\n",
REPORT_CODE_OFF+depth*2, "", PL_colors[4],
ST.accept_buff[best].wordnum,
- tmp ? SvPV_nolen_const( *tmp ) : "not compiled under -Dr",
+ tmp ? pv_pretty(sv, SvPV_nolen_const(*tmp), SvCUR(*tmp), 0,
+ PL_colors[0], PL_colors[1],
+ (SvUTF8(*tmp) ? PERL_PV_ESCAPE_UNI : 0)
+ ) : "not compiled under -Dr",
REG_NODE_NUM(nextop),
PL_colors[5] );
});