mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-01 15:45:08 +08:00
c2664f087e
This bug was caused by the fact that ctypes silently converts returned c_void_p instances into python int values, even if the restype of a function is c_void_p. Then, without explicit argtypes (which this module doesn't use, out of laziness on my part), python ints passed to functions are treated as 32-bit ints. Solution: explicitly wrap returned pointers as c_void_p, so that they'll get treated right when passed back to C. No more segfaults! I also reverted the _wrap_bitmap_bits_in_array code to what I wrote, as I can vouch for that on 64-bit, whereas the other version had a "still crashes" note...