[pypy-svn] r51011 - in pypy/dist/pypy/rpython/lltypesystem: . test

fijal at codespeak.net fijal at codespeak.net
Fri Jan 25 10:31:54 CET 2008


Author: fijal
Date: Fri Jan 25 10:31:53 2008
New Revision: 51011

Modified:
   pypy/dist/pypy/rpython/lltypesystem/lltype.py
   pypy/dist/pypy/rpython/lltypesystem/test/test_lltype.py
Log:
Kill this hack.


Modified: pypy/dist/pypy/rpython/lltypesystem/lltype.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/lltype.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/lltype.py	Fri Jan 25 10:31:53 2008
@@ -1773,9 +1773,6 @@
     assert oddint & 1, "only odd integers can be cast back to ptr"
     return _ptr(PTRTYPE, oddint, solid=True)
 
-def cast_float_to_int(val):
-    return struct.unpack('i', struct.pack('d', val))[0]
-
 def attachRuntimeTypeInfo(GCSTRUCT, funcptr=None, destrptr=None):
     if not isinstance(GCSTRUCT, RttiStruct):
         raise TypeError, "expected a RttiStruct: %s" % GCSTRUCT

Modified: pypy/dist/pypy/rpython/lltypesystem/test/test_lltype.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/test/test_lltype.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/test/test_lltype.py	Fri Jan 25 10:31:53 2008
@@ -696,9 +696,6 @@
     assert cast_ptr_to_int(t) == 21
     assert s == cast_pointer(Ptr(S), t)
 
-def test_cast_float():
-    assert cast_float_to_int(2.3) == 0x40133333
-
 def test_str_of_dead_ptr():
     S = Struct('S', ('x', Signed))
     T = GcStruct('T', ('s', S))



More information about the Pypy-commit mailing list