Multiplatform ctypes usage