On Thu, 1 Dec 2011 18:13:05 -0500, James Westby <jw+debian@jameswestby.net> wrote: > From: James Westby <james.westby@linaro.org> > > ctypes doesn't return c_void_p return values as that, it returns them as > 32-bit integers instead. This has two problems: > > 1 - On 64-bit machines anything higher than the max 32-bit integer > will overflow when passed back in to another function expecting, > a pointer giving the wrong value. > > 2 - If the value isn't stored as a pointer then the memory can be > re-used and so the object will be corrupted. > > The fix for both of these is to store the values as pointers. http://osdir.com/ml/python.ctypes/2006-12/msg00048.html states that this is expected behaviour of ctypes. Thanks, James