summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-01-15 20:31:14 +0100
committerYves Orton <demerphq@gmail.com>2023-03-13 21:26:08 +0800
commitd78630f1ec4da716988da18d97cb6425388e696c (patch)
tree6ef6a501ea3219d2f493179de78e930b09ce2763 /regexec.c
parent17e3e02ad120eabda2bdb6c297a70d53294437ef (diff)
downloadperl-d78630f1ec4da716988da18d97cb6425388e696c.tar.gz
regcomp.c - extend REF to hold the paren it needs to regcppush
this way we can avoid pushing every buffer, we only need to push the nestroot of the ref.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 3a8e160478..eb1fe4e06a 100644
--- a/regexec.c
+++ b/regexec.c
@@ -8068,7 +8068,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
}
ref_yes:
if (scan->flags) { /* == VOLATILE_REF but only other value is 0 */
- ST.cp = regcppush(rex, 0, maxopenparen);
+ ST.cp = regcppush(rex, ARG2u(scan) - 1, maxopenparen);
REGCP_SET(ST.lastcp);
PUSH_STATE_GOTO(REF_next, next, locinput, loceol,
script_run_begin);
@@ -8105,7 +8105,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
U32 arg;
case GOSUB: /* /(...(?1))/ /(...(?&foo))/ */
- arg= (U32)ARG1u(scan);
+ arg = ARG1u(scan);
if (cur_eval && cur_eval->locinput == locinput) {
if ( ++nochange_depth > max_nochange_depth )
Perl_croak(aTHX_
@@ -8620,7 +8620,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
is_accepted = true;
if (scan->flags)
sv_yes_mark = MUTABLE_SV(rexi->data->data[ ARG1u( scan ) ]);
- utmp = (U32)ARG2i(scan);
+ utmp = ARG2u(scan);
if ( utmp ) {
regnode *cursor;