[issue24470] ctypes incorrect handling of long int on 64bits Linux

2015-07-19 Thread Marco Clemencic
Marco Clemencic added the comment: Hi, apologies for the very late answer, but I just discovered that the mails got flagged as spam :( In any case, I do not know where I got this "args" from, but I can confirm that the problem is just a bug on my side. Thanks Marco --

[issue24470] ctypes incorrect handling of long int on 64bits Linux

2015-06-19 Thread Marco Clemencic
New submission from Marco Clemencic: When passing a Python int to a C function expecting long int (or void*) via ctypes, the number gets truncated to 32 bits, even if the args types are correctly declared. The workaround is to wrap the argument in c_long (or c_void_p), but the automatic