From 1a77d3ede25ff80e13f7da436eff99bb83228476 Mon Sep 17 00:00:00 2001 Message-Id: <1a77d3ede25ff80e13f7da436eff99bb83228476.1746204891.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 22 Mar 2006 13:00:22 +0000 Subject: [PATCH] _u32: Allow LONG_MAX to be stored in a Python int. Organization: Straylight/Edgeware From: Mark Wooding --- utils.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.pyx b/utils.pyx index 6b62989..849effe 100644 --- a/utils.pyx +++ b/utils.pyx @@ -26,7 +26,7 @@ # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. cdef object _u32(uint32 x): - if x < LONG_MAX: + if x <= LONG_MAX: return PyInt_FromLong(x) else: return PyLong_FromUnsignedLong(x) -- [mdw]