ctypes from_param() truncating 64 bit pointers to 32 bit
Joakim Hove
joakim.hove at gmail.com
Fri Feb 18 05:15:00 EST 2011
More information about the Python-list mailing list
Fri Feb 18 05:15:00 EST 2011
- Previous message (by thread): ctypes from_param() truncating 64 bit pointers to 32 bit
- Next message (by thread): mortar_rdb 1.0.0 released!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 18 Feb, 10:55, Stefan Krah <stefan-use... at bytereef.org> wrote: > Joakim Hove <joakim.h... at gmail.com> wrote: > > > and I actually don't know how this specific case works. > > > However, you are not providing a function signature for the "print_addr" C > > > function in the BugTest case, so my guess is that it assumes the standard > > > signature for C functions, which is "int func(int)". That would explain the > > > 32bit truncation. > > > Well; I think you are wrong. First of all because what I showed in the > > Stackoverflow post was just a contrived example - the real code where > > the problem initially arose does indeed have the proper function > > signature. > > I suggest that you reconsider, since this appears to work: > > def from_param(self): > return ctypes.c_void_p(self.c_ptr) > > Stefan Krah That works - thank you very much! Joakim
- Previous message (by thread): ctypes from_param() truncating 64 bit pointers to 32 bit
- Next message (by thread): mortar_rdb 1.0.0 released!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list