##// END OF EJS Templates
util: move compilere to a class...
Siddharth Agarwal -
r21908:cad9dadc default
parent child Browse files
Show More
@@ -716,7 +716,8 try:
716 except ImportError:
716 except ImportError:
717 _re2 = False
717 _re2 = False
718
718
719 def compilere(pat, flags=0):
719 class _re(object):
720 def compile(self, pat, flags=0):
720 '''Compile a regular expression, using re2 if possible
721 '''Compile a regular expression, using re2 if possible
721
722
722 For best performance, use only re2-compatible regexp features. The
723 For best performance, use only re2-compatible regexp features. The
@@ -740,6 +741,9 def compilere(pat, flags=0):
740 pass
741 pass
741 return remod.compile(pat, flags)
742 return remod.compile(pat, flags)
742
743
744 re = _re()
745 compilere = re.compile
746
743 _fspathcache = {}
747 _fspathcache = {}
744 def fspath(name, root):
748 def fspath(name, root):
745 '''Get name in the case stored in the filesystem
749 '''Get name in the case stored in the filesystem
General Comments 0
You need to be logged in to leave comments. Login now