Commits

Antonio Cuni  committed 5e8697a

make it working on 32bit

  • Participants
  • Parent commits e6c43c1

Comments (0)

Files changed (1)

File numpypy_c/testing/test_numpypy_c.py

 def test_SimpleNewFromData():
     buf = (ctypes.c_double*4)(1, 2, 3, 4)
     addr = ctypes.cast(buf, ctypes.c_void_p).value
+    addr = ctypes.c_long(addr).value # convert it to a signed value
     array = c_test._frombuffer_2_2(addr)
     assert isinstance(array, np.ndarray)
     assert array.dtype == np.float64