X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regexec.c;h=db3cecb88482692a579c6f2fb256103e5cb3f387;hb=080c2decc1c1070c5ce819e741a37407aa249711;hp=c8a46f09e01598d8154791921e4d43dd112b3bf5;hpb=7ef91622a9e34f97a4166311297799ae9bd8c402;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regexec.c b/regexec.c index c8a46f0..db3cecb 100644 --- a/regexec.c +++ b/regexec.c @@ -67,7 +67,8 @@ * **** Alterations to Henry's code are... **** - **** Copyright (c) 1991-2003, Larry Wall + **** Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + **** 2000, 2001, 2002, 2003, by Larry Wall and others **** **** You may distribute under the terms of either the GNU General Public **** License or the Artistic License, as specified in the README file. @@ -171,7 +172,7 @@ S_regcppush(pTHX_ I32 parenfloor) Perl_croak(aTHX_ "panic: paren_elems_to_push < 0"); #define REGCP_OTHER_ELEMS 6 - SSCHECK(paren_elems_to_push + REGCP_OTHER_ELEMS); + SSGROW(paren_elems_to_push + REGCP_OTHER_ELEMS); for (p = PL_regsize; p > parenfloor; p--) { /* REGCP_PARENS_ELEMS are pushed per pairs of parentheses. */ SSPUSHINT(PL_regendp[p]); @@ -2834,6 +2835,7 @@ S_regmatch(pTHX_ regnode *prog) COP *ocurcop = PL_curcop; PAD *old_comppad; SV *ret; + struct regexp *oreg = PL_reg_re; n = ARG(scan); PL_op = (OP_4tree*)PL_regdata->data[n]; @@ -2966,8 +2968,10 @@ S_regmatch(pTHX_ regnode *prog) sw = SvTRUE(ret); logical = 0; } - else + else { sv_setsv(save_scalar(PL_replgv), ret); + cache_re(oreg); + } break; } case OPEN: