[pypy-svn] pypy real-rffi.INT: Remove rffi.INT_real

amauryfa commits-noreply at bitbucket.org
Wed Mar 2 13:55:25 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: real-rffi.INT
Changeset: r42384:3c9c94fb91ee
Date: 2011-03-02 13:31 +0100
http://bitbucket.org/pypy/pypy/changeset/3c9c94fb91ee/

Log:	Remove rffi.INT_real

diff --git a/pypy/rpython/lltypesystem/rffi.py b/pypy/rpython/lltypesystem/rffi.py
--- a/pypy/rpython/lltypesystem/rffi.py
+++ b/pypy/rpython/lltypesystem/rffi.py
@@ -405,10 +405,6 @@
 
 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)
-INT_real = lltype.build_number("INT", r_int_real)
-platform.numbertype_to_rclass[INT_real] = r_int_real
-NUMBER_TYPES.append(INT_real)
 
 # ^^^ this creates at least the following names:
 # --------------------------------------------------------------------

diff --git a/pypy/rpython/lltypesystem/ll2ctypes.py b/pypy/rpython/lltypesystem/ll2ctypes.py
--- a/pypy/rpython/lltypesystem/ll2ctypes.py
+++ b/pypy/rpython/lltypesystem/ll2ctypes.py
@@ -100,7 +100,6 @@
         rffi.SHORT:      ctypes.c_short,
         rffi.USHORT:     ctypes.c_ushort,
         rffi.INT:        ctypes.c_int,
-        rffi.INT_real:   ctypes.c_int,
         rffi.UINT:       ctypes.c_uint,
         rffi.LONG:       ctypes.c_long,
         rffi.ULONG:      ctypes.c_ulong,

diff --git a/pypy/translator/c/primitive.py b/pypy/translator/c/primitive.py
--- a/pypy/translator/c/primitive.py
+++ b/pypy/translator/c/primitive.py
@@ -208,7 +208,6 @@
 define_c_primitive(rffi.SHORT, 'short')
 define_c_primitive(rffi.USHORT, 'unsigned short')
 define_c_primitive(rffi.INT, 'int')
-define_c_primitive(rffi.INT_real, 'int')
 define_c_primitive(rffi.UINT, 'unsigned int')
 define_c_primitive(rffi.LONG, 'long', 'L')
 define_c_primitive(rffi.ULONG, 'unsigned long', 'UL')

diff --git a/pypy/translator/c/test/test_database.py b/pypy/translator/c/test/test_database.py
--- a/pypy/translator/c/test/test_database.py
+++ b/pypy/translator/c/test/test_database.py
@@ -5,7 +5,7 @@
 from pypy.objspace.flow.model import Constant, Variable, SpaceOperation
 from pypy.objspace.flow.model import Block, Link, FunctionGraph
 from pypy.rpython.typesystem import getfunctionptr
-from pypy.rpython.lltypesystem.rffi import VOIDP, INT_real, INT
+from pypy.rpython.lltypesystem.rffi import VOIDP, INT
 
 
 def dump_on_stdout(database):
@@ -228,11 +228,13 @@
     assert db.gettype(A) == "void *@"
 
 def test_intlong_unique():
-    A = INT_real
-    B = Signed
+    A = INT
+    B = LONG
+    C = Signed
     db = LowLevelDatabase()
     assert db.gettype(A) == "int @"
     assert db.gettype(B) == "long @"
+    assert db.gettype(C) == "long @" # except on win64
 
 
 def test_recursive_struct():


More information about the Pypy-commit mailing list