fix tescase for cast to pointer from integer of different size in 64bits
authorLisandro Dalcin <dalcinl@gmail.com>
Wed, 10 Mar 2010 00:48:49 +0000 (21:48 -0300)
committerLisandro Dalcin <dalcinl@gmail.com>
Wed, 10 Mar 2010 00:48:49 +0000 (21:48 -0300)
tests/run/ctruthtests.pyx

index f534f821d6d47c01d2f0eaa1ff371981fb4ba692..499519824626a8679666ec18f760a9a9c032ffd9 100644 (file)
@@ -77,9 +77,16 @@ def test_attr_int(TestExtInt e):
     else:
         return False
 
+ctypedef union _aux:
+    int i
+    void *p
+
 cdef class TestExtPtr:
     cdef void* p
-    def __init__(self, int i): self.p = <void*>i
+    def __init__(self, int i): 
+        cdef _aux aux
+        aux.i = i
+        self.p = aux.p
 
 def test_attr_ptr(TestExtPtr e):
     """