]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Disable big charsets in UCS-4 builds. Works around #599377.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 26 Sep 2002 16:41:10 +0000 (16:41 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 26 Sep 2002 16:41:10 +0000 (16:41 +0000)
Lib/sre_compile.py

index 1175f6731820f7843369b260ab0761be36c307e3..424604bf8243891a8cdf302d2085945efadb7255 100644 (file)
@@ -188,6 +188,9 @@ def _optimize_charset(charset, fixup):
                 # XXX: could append to charmap tail
                 return charset # cannot compress
     except IndexError:
+        if sys.maxunicode != 65535:
+            # XXX: big charsets don't work in UCS-4 builds
+            return charset
         # character set contains unicode characters
         return _optimize_unicode(charset, fixup)
     # compress character map