• Gustavo Niemeyer's avatar
    Fix for part of the problem mentioned in #725149 by Greg Chapman. · 3646ab98
    Gustavo Niemeyer yazdı
    This problem is related to a wrong behavior from mark_save/restore(),
    which don't restore the mark_stack_base before restoring the marks.
    Greg's suggestion was to change the asserts, which happen to be
    the only recursive ops that can continue the loop, but the problem would
    happen to any operation with the same behavior. So, rather than
    hardcoding this into asserts, I have changed mark_save/restore() to
    always restore the stackbase before restoring the marks.
    
    Both solutions should fix these two cases, presented by Greg:
    
    >>> re.match('(a)(?:(?=(b)*)c)*', 'abb').groups()
    ('b', None)
    >>> re.match('(a)((?!(b)*))*', 'abb').groups()
    ('b', None, None)
    
    The rest of the bug and patch in #725149 must be discussed further.
    3646ab98
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...