summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-02-24 12:54:59 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-02-24 12:54:59 +0000
commit2bb14304c505556bf183ed7772a95e259fa0724d (patch)
treed06d03a85ace1f95a6e8a29563817311eec062f3 /pp_hot.c
parent2e04d155f08a1e8a75841a7f9d1bae1dde16a12a (diff)
parentfed34a19f844dc41c481323fae2b2e39e655b50a (diff)
downloadperl-2bb14304c505556bf183ed7772a95e259fa0724d.tar.gz
Integrate from mainperl.
p4raw-id: //depot/cfgperl@3024
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pp_hot.c b/pp_hot.c
index b1bf270866..3ab4f304e7 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -855,7 +855,7 @@ PP(pp_match)
register char *s;
char *strend;
I32 global;
- I32 r_flags;
+ I32 r_flags = 0;
char *truebase;
register REGEXP *rx = pm->op_pmregexp;
bool rxtainted;
@@ -904,14 +904,18 @@ PP(pp_match)
if (mg && mg->mg_len >= 0) {
if (!(rx->reganch & ROPT_GPOS_SEEN))
rx->endp[0] = rx->startp[0] = s + mg->mg_len;
+ else if (rx->reganch & ROPT_ANCH_GPOS) {
+ r_flags |= REXEC_IGNOREPOS;
+ rx->endp[0] = rx->startp[0] = s + mg->mg_len;
+ }
minmatch = (mg->mg_flags & MGf_MINMATCH);
update_minmatch = 0;
}
}
}
- r_flags = ((gimme != G_ARRAY && !global && rx->nparens)
- || SvTEMP(TARG) || PL_sawampersand)
- ? REXEC_COPY_STR : 0;
+ if ((gimme != G_ARRAY && !global && rx->nparens)
+ || SvTEMP(TARG) || PL_sawampersand)
+ r_flags |= REXEC_COPY_STR;
if (SvSCREAM(TARG) && rx->check_substr
&& SvTYPE(rx->check_substr) == SVt_PVBM
&& SvVALID(rx->check_substr))