1. Pypy
  2. Untitled project
  3. pypy

Commits

Amaury Forgeot d'Arc  committed 3c9c94f

Remove rffi.INT_real

  • Participants
  • Parent commits 22f190b
  • Branches real-rffi.INT

Comments (0)

Files changed (4)

File pypy/rpython/lltypesystem/ll2ctypes.py

View file
         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,

File pypy/rpython/lltypesystem/rffi.py

View file
 
 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:
 # --------------------------------------------------------------------

File pypy/translator/c/primitive.py

View file
 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')

File pypy/translator/c/test/test_database.py

View file
 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):
     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():