From: Dave Mitchell Date: Wed, 5 Apr 2006 03:17:50 +0000 (+0000) Subject: (??{...}) didn't always restore PL_reg_re. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=878305029f3dfbd9e56219891ad218e5edbb3c02;p=p5sagit%2Fp5-mst-13.2.git (??{...}) didn't always restore PL_reg_re. Also trie debugging output was using a var that was no longer valid p4raw-id: //depot/perl@27717 --- diff --git a/regexec.c b/regexec.c index 2f6313d..663af09 100644 --- a/regexec.c +++ b/regexec.c @@ -2805,6 +2805,8 @@ S_regmatch(pTHX_ regexp *rex, regnode *prog) best = cur; } DEBUG_EXECUTE_r({ + reg_trie_data * const trie = (reg_trie_data*) + PL_reg_re->data->data[ARG(scan)]; SV ** const tmp = av_fetch( trie->words, st->u.trie.accept_buff[ best ].wordnum - 1, 0 ); PerlIO_printf( Perl_debug_log, "%*s %strying alternation #%d <%s> at 0x%p%s\n", REPORT_CODE_OFF+PL_regindent*2, "", PL_colors[4], @@ -3279,10 +3281,10 @@ S_regmatch(pTHX_ regexp *rex, regnode *prog) PL_op = oop; PAD_RESTORE_LOCAL(old_comppad); PL_curcop = ocurcop; + PL_reg_re = oreg; if (!st->logical) { /* /(?{...})/ */ sv_setsv(save_scalar(PL_replgv), ret); - PL_reg_re = oreg; break; } }