[pypy-svn] r74261 - in pypy/trunk/pypy: rlib rlib/test rpython/lltypesystem
afa at codespeak.net
afa at codespeak.net
Fri Apr 30 01:13:49 CEST 2010
Author: afa
Date: Fri Apr 30 01:13:47 2010
New Revision: 74261
Modified:
pypy/trunk/pypy/rlib/rarithmetic.py
pypy/trunk/pypy/rlib/test/test_rbigint.py
pypy/trunk/pypy/rpython/lltypesystem/rffi.py
Log:
Fix one test in test_rbigint: "int_real" does not implement arithmetic
and should be skipped.
Modified: pypy/trunk/pypy/rlib/rarithmetic.py
==============================================================================
--- pypy/trunk/pypy/rlib/rarithmetic.py (original)
+++ pypy/trunk/pypy/rlib/rarithmetic.py Fri Apr 30 01:13:47 2010
@@ -380,6 +380,8 @@
r_int = build_int('r_int', True, LONG_BIT)
r_uint = build_int('r_uint', False, LONG_BIT)
+r_int_real = build_int('r_int_real', r_int.SIGN, r_int.BITS,
+ force_creation=True)
r_longlong = build_int('r_longlong', True, 64)
r_ulonglong = build_int('r_ulonglong', False, 64)
Modified: pypy/trunk/pypy/rlib/test/test_rbigint.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_rbigint.py (original)
+++ pypy/trunk/pypy/rlib/test/test_rbigint.py Fri Apr 30 01:13:47 2010
@@ -473,11 +473,11 @@
def test_args_from_rarith_int(self):
from pypy.rpython.tool.rfficache import platform
- from pypy.rlib.rarithmetic import r_int
+ from pypy.rlib.rarithmetic import r_int, r_int_real
classlist = platform.numbertype_to_rclass.values()
fnlist = []
for r in classlist:
- if r is r_int: # and also r_longlong on 64-bit
+ if r in (r_int, r_int_real): # and also r_longlong on 64-bit
continue
if r is int:
mask = sys.maxint*2+1
Modified: pypy/trunk/pypy/rpython/lltypesystem/rffi.py
==============================================================================
--- pypy/trunk/pypy/rpython/lltypesystem/rffi.py (original)
+++ pypy/trunk/pypy/rpython/lltypesystem/rffi.py Fri Apr 30 01:13:47 2010
@@ -386,7 +386,7 @@
NUMBER_TYPES = setup()
platform.numbertype_to_rclass[lltype.Signed] = int # avoid "r_long" for common cases
-r_int_real = rarithmetic.build_int("r_int_real", r_int.SIGN, r_int.BITS, True)
+r_int_real = rarithmetic.r_int_real
INT_real = lltype.build_number("INT", r_int_real)
platform.numbertype_to_rclass[INT_real] = r_int_real
NUMBER_TYPES.append(INT_real)
More information about the Pypy-commit
mailing list