CTypes on a 64 bit machine truncates pointers to 32 bits?
rNOSPAMon at flownet.com
Fri Sep 19 08:29:06 CEST 2008
In article <48d34449$0$2363$9b622d9e at news.freenet.de>,
"Martin v. Löwis" <martin at v.loewis.de> wrote:
> >>>> foolib = cdll.LoadLibrary('foo.so')
> >>>> foolib.foo(0xF00000000)
> > 0
> Shouldn't you tell ctypes that the argument and the result
> of foo is a pointer?
Yeah... that's it. Default return type is int, which I assumed would be
64 bits on a 64 bit machine, but turns out it's 32. Stupid.
More information about the Python-list