diff options
author | Hugo van der Sanden <hv@crypt.org> | 2001-08-16 19:50:01 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-17 01:50:01 +0000 |
commit | 0af80b6034aad516a126a9414dadccac4de7f9dc (patch) | |
tree | bb35413dc3f0915a9c466bbfe04506e69628603e /pp_hot.c | |
parent | 2ed46c510b148e10cfdfa30b4a887b45b5ac877b (diff) | |
download | perl-0af80b6034aad516a126a9414dadccac4de7f9dc.tar.gz |
Re: [ID 20010814.004] pos() doesn't work when using =~m// in list context
Message-Id: <200108161750.f7GHo1l22207@crypt.compulink.co.uk>
p4raw-id: //depot/perl@11696
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1336,6 +1336,22 @@ play_it_again: } } if (global) { + if (pm->op_pmflags & PMf_CONTINUE) { + MAGIC* mg = 0; + if (SvTYPE(TARG) >= SVt_PVMG && SvMAGIC(TARG)) + mg = mg_find(TARG, PERL_MAGIC_regex_global); + if (!mg) { + sv_magic(TARG, (SV*)0, PERL_MAGIC_regex_global, Nullch, 0); + mg = mg_find(TARG, PERL_MAGIC_regex_global); + } + if (rx->startp[0] != -1) { + mg->mg_len = rx->endp[0]; + if (rx->startp[0] == rx->endp[0]) + mg->mg_flags |= MGf_MINMATCH; + else + mg->mg_flags &= ~MGf_MINMATCH; + } + } had_zerolen = (rx->startp[0] != -1 && rx->startp[0] == rx->endp[0]); PUTBACK; /* EVAL blocks may use stack */ |