[Python-checkins] python/dist/src/Lib sre_compile.py,1.44,1.45

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Sun, 23 Feb 2003 17:18:37 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv23246

Modified Files:
	sre_compile.py 
Log Message:
Fix from SF patch #633359 by Greg Chapman for SF bug #610299:
    The problem is in sre_compile.py: the call to
    _compile_charset near the end of _compile_info forgets to
    pass in the flags, so that the info charset is not compiled
    with re.U. (The info charset is used when searching to find
    the first character at which a match could start; it is not
    generated for patterns beginning with a repeat like '\w{1}'.) 


Index: sre_compile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** sre_compile.py	26 Sep 2002 16:39:20 -0000	1.44
--- sre_compile.py	24 Feb 2003 01:18:35 -0000	1.45
***************
*** 400,404 ****
          code.extend(table[1:]) # don't store first entry
      elif charset:
!         _compile_charset(charset, 0, code)
      code[skip] = len(code) - skip
  
--- 400,404 ----
          code.extend(table[1:]) # don't store first entry
      elif charset:
!         _compile_charset(charset, flags, code)
      code[skip] = len(code) - skip