Author: Christian Tismer <tis...@stackless.com> Branch: win64_gborg Changeset: r48978:4e6f08cf4321 Date: 2011-11-09 02:34 +0100 http://bitbucket.org/pypy/pypy/changeset/4e6f08cf4321/
Log: test_ll_time: test_time_sleep works diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py --- a/pypy/rlib/rarithmetic.py +++ b/pypy/rlib/rarithmetic.py @@ -487,6 +487,8 @@ else: r_uint32 = r_uint +# needed for ll_time.time_sleep_llimpl +maxint32 = int((1 << 31) -1) # the 'float' C type diff --git a/pypy/rpython/module/ll_time.py b/pypy/rpython/module/ll_time.py --- a/pypy/rpython/module/ll_time.py +++ b/pypy/rpython/module/ll_time.py @@ -9,7 +9,7 @@ from pypy.rpython.lltypesystem import lltype from pypy.rpython.extfunc import BaseLazyRegistering, registering, extdef from pypy.rlib import rposix -from pypy.rlib.rarithmetic import intmask +from pypy.rlib.rarithmetic import intmask, maxint32 from pypy.translator.tool.cbuild import ExternalCompilationInfo if sys.platform == 'win32': @@ -177,7 +177,7 @@ @registering(time.sleep) def register_time_sleep(self): if sys.platform == 'win32': - MAX = sys.maxint + MAX = maxint32 Sleep = self.llexternal('Sleep', [rffi.ULONG], lltype.Void) def time_sleep_llimpl(secs): millisecs = secs * 1000.0 _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit