[pypy-commit] pypy default: Translation fix on 64-bits

arigo noreply at buildbot.pypy.org
Wed Feb 13 11:31:08 CET 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r61170:4de14e41742f
Date: 2013-02-13 11:30 +0100
http://bitbucket.org/pypy/pypy/changeset/4de14e41742f/

Log:	Translation fix on 64-bits

diff --git a/pypy/module/_cffi_backend/newtype.py b/pypy/module/_cffi_backend/newtype.py
--- a/pypy/module/_cffi_backend/newtype.py
+++ b/pypy/module/_cffi_backend/newtype.py
@@ -1,7 +1,7 @@
 from pypy.interpreter.error import OperationError, operationerrfmt
 from pypy.interpreter.gateway import unwrap_spec
 from rpython.rtyper.lltypesystem import lltype, rffi
-from rpython.rlib.rarithmetic import ovfcheck, r_uint
+from rpython.rlib.rarithmetic import ovfcheck, r_uint, intmask
 from rpython.rlib.rarithmetic import most_neg_value_of, most_pos_value_of
 from rpython.rlib.objectmodel import specialize
 
@@ -299,7 +299,7 @@
                               name, enumerators[i])
     #
     if smallest_value < 0:
-        if (smallest_value >= most_neg_value_of(rffi.INT) and
+        if (smallest_value >= intmask(most_neg_value_of(rffi.INT)) and
              largest_value <= r_uint(most_pos_value_of(rffi.INT))):
             size = rffi.sizeof(rffi.INT)
             align = alignment(rffi.INT)


More information about the pypy-commit mailing list