##// 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 716 except ImportError:
717 717 _re2 = False
718 718
719 def compilere(pat, flags=0):
719 class _re(object):
720 def compile(self, pat, flags=0):
720 721 '''Compile a regular expression, using re2 if possible
721 722
722 723 For best performance, use only re2-compatible regexp features. The
@@ -740,6 +741,9 def compilere(pat, flags=0):
740 741 pass
741 742 return remod.compile(pat, flags)
742 743
744 re = _re()
745 compilere = re.compile
746
743 747 _fspathcache = {}
744 748 def fspath(name, root):
745 749 '''Get name in the case stored in the filesystem
General Comments 0
You need to be logged in to leave comments. Login now