Thanks for answering; > I rarely use ctypes
You should :-) Apart from my current struggle I think ctypes is really good. > 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. Secondly: <Uncertain>The use function signatures will be relevant for C-C linkage, but ctypes library only relates to the fully linked shared librarry lib.so where these signatures have been long lost anyway; that is why we have to specify the argtypes and restype attributes of the ctypes function objects?</Uncertain>. Joakim -- http://mail.python.org/mailman/listinfo/python-list