From: Serhiy Storchaka Date: Tue, 21 May 2013 19:53:33 +0000 (+0300) Subject: Issue #17979: Fixed the re module in build with --disable-unicode. X-Git-Tag: v2.7.6rc1~381 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cb1a0283c3379c35722832ebdf803d6f509b7b11;p=thirdparty%2FPython%2Fcpython.git Issue #17979: Fixed the re module in build with --disable-unicode. --- diff --git a/Misc/NEWS b/Misc/NEWS index b2485eff3e60..9367bd54f532 100644 --- 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. diff --git a/Modules/sre.h b/Modules/sre.h index 200e492d264d..15ed3d511b70 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -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)