]> granicus.if.org Git - python/commitdiff
Disable big charsets in UCS-4 builds. Works around #599377.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 26 Sep 2002 16:39:20 +0000 (16:39 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 26 Sep 2002 16:39:20 +0000 (16:39 +0000)
Will backport to 2.2

Lib/sre_compile.py

index 30957a827b081457a2564c967518d298fc626340..e5adb7e46a7817a57e2c4f43c46547d947cd755b 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