[pypy-svn] r78804 - pypy/branch/fast-forward/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Sun Nov 7 11:03:52 CET 2010


Author: afa
Date: Sun Nov  7 11:03:51 2010
New Revision: 78804

Modified:
   pypy/branch/fast-forward/pypy/module/cpyext/structmember.py
Log:
Fix translation


Modified: pypy/branch/fast-forward/pypy/module/cpyext/structmember.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/cpyext/structmember.py	(original)
+++ pypy/branch/fast-forward/pypy/module/cpyext/structmember.py	Sun Nov  7 11:03:51 2010
@@ -41,7 +41,10 @@
         typ, lltyp, _ = converter
         if typ == member_type:
             result = rffi.cast(rffi.CArrayPtr(lltyp), addr)
-            w_result = space.wrap(result[0])
+            if lltyp is rffi.FLOAT:
+                w_result = space.wrap(rffi.cast(rffi.DOUBLE, result[0]))
+            else:
+                w_result = space.wrap(result[0])
             return w_result
 
     if member_type == T_STRING:



More information about the Pypy-commit mailing list