On Sun, Apr 29, 2001 at 05:09:30PM +0100, Hugo wrote: > :> Not that I can see: regexec_flags() sets it whenever startpos == strbeg, > :> before any calls to find_byclass either indirectly (through intuit_start) > :> or directly. > : > :This means that I'm right: intuit_start() is usually called *before* > :regexec_flags() is entered. > > However, it is called either at the start of the string or after a > successful call to regexec_flags(), after either of which PL_regprev > should be correctly set. The only exception is when we get a successful > match without calling regexec_flags(), in pp_match (look for 'goto yup'), > so I guess we additionally need to set PL_regprev in this case. Hmm??? The only interpretation I can attach to what you wrote is that you assume that RExen are always applied to same string, and always with //gc... > :I would hope that lookbehind resets PL_regprev. > > Not that I can see. I mixed it with PL_reginput. > --- thrdvar.h.old Tue Jan 30 18:14:40 2001 > +++ thrdvar.h Sun Apr 29 16:18:07 2001 > @@ -183,7 +183,6 @@ > PERLVAR(Tregendp, I32 *) /* Ditto for endp. */ > PERLVAR(Treglastparen, U32 *) /* Similarly for lastparen. */ > PERLVAR(Tregtill, char *) /* How far we are required to go. */ > -PERLVAR(Tregprev, char) /* char before regbol, \n if none */ > PERLVAR(Treg_start_tmp, char **) /* from regexec.c */ > PERLVAR(Treg_start_tmpl,U32) /* from regexec.c */ > PERLVAR(Tregdata, struct reg_data *) This is not possible for binary backward-compatibility reasons. The old entries should remain. > - if (s == startpos) > + if (s == PL_bostr) Why? This would slow things down. IlyaThread Previous | Thread Next