Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r44686:e63df4bf1568 Date: 2011-06-04 07:26 +0200 http://bitbucket.org/pypy/pypy/changeset/e63df4bf1568/
Log: Translation fix. diff --git a/pypy/module/cpyext/intobject.py b/pypy/module/cpyext/intobject.py --- a/pypy/module/cpyext/intobject.py +++ b/pypy/module/cpyext/intobject.py @@ -73,12 +73,14 @@ space.wrap("an integer is required, got NULL")) return space.int_w(w_obj) # XXX this is wrong on win64 +LONG_MAX = int(LONG_TEST - 1) + @cpython_api([rffi.SIZE_T], PyObject) def PyInt_FromSize_t(space, ival): """Create a new integer object with a value of ival. If the value exceeds LONG_MAX, a long integer object is returned. """ - if ival < LONG_TEST: + if ival <= LONG_MAX: return space.wrap(intmask(ival)) return space.wrap(ival) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit