From: Mark Wooding Date: Wed, 22 Mar 2006 13:00:22 +0000 (+0000) Subject: _u32: Allow LONG_MAX to be stored in a Python int. X-Git-Tag: 1.0.1~14 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/commitdiff_plain/1a77d3ede25ff80e13f7da436eff99bb83228476?hp=f3946a80c491dd87854ea48d7be05fb0a35d8459 _u32: Allow LONG_MAX to be stored in a Python int. --- 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)