Matthew Barnett added the comment:

> > -                (!ctx->match_all || ctx->ptr == state->end)) {
> > +                ctx->ptr == state->end) {
> 
> Why this check is not needed anymore?
> 
After stepping through the code for that regex that fails, I concluded 
that the condition shouldn't depend on ctx->match_all at that point 
after all.

> > -                    status = SRE(match)(state, pattern + 2*prefix_skip);
> > +                    status = SRE(match)(state, pattern + 2*prefix_skip, 
> state->match_all);
> 
> > -            status = SRE(match)(state, pattern + 2);
> > +            status = SRE(match)(state, pattern + 2, state->match_all);
> 
> state->match_all is used but it is never initialized.

I thought I'd initialised it in all the places it's used.

I admit that I find the code a little hard to follow at times... :-(

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to