]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #17979: Fixed the re module in build with --disable-unicode.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 21 May 2013 19:53:33 +0000 (22:53 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 21 May 2013 19:53:33 +0000 (22:53 +0300)
Misc/NEWS
Modules/sre.h

index b2485eff3e607dcd6e2c45e57cb8260b2fc0146f..9367bd54f532144f086940e9e4fb66ab3308d3da 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -58,6 +58,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #17979: Fixed the re module in build with --disable-unicode.
+
 - Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
  .characters() and ignorableWhitespace() methods.  Original patch by Sebastian
   Ortiz Vasquez.
index 200e492d264d75dc480bda7bca5d980a1353ed7c..15ed3d511b70f1c58481db074f7cad079a9e46fb 100644 (file)
@@ -23,8 +23,8 @@
 #  define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX + 1u)
 # endif
 #else
-# define SRE_CODE unsigned long
-# if SIZEOF_SIZE_T > SIZEOF_LONG
+# define SRE_CODE unsigned int
+# if SIZEOF_SIZE_T > SIZEOF_INT
 #  define SRE_MAXREPEAT (~(SRE_CODE)0)
 # else
 #  define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX + 1u)