From cb1a0283c3379c35722832ebdf803d6f509b7b11 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 21 May 2013 22:53:33 +0300 Subject: Issue #17979: Fixed the re module in build with --disable-unicode. --- Misc/NEWS | 2 ++ Modules/sre.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index b2485ef..9367bd5 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 200e492..15ed3d5 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) -- cgit v0.12