STINNER Victor added the comment: Ooops, I had a typo in my code! Argument types argument name is "argtypes" and not "argstype". But well, the ticket is still valid :-) But it's more an enhancement than a bugfix ;-) So the right code is :
from ctypes import cdll, c_double libm = cdll.LoadLibrary("libm.so") sqrt = libm.sqrt sqrt.restype = c_double print sqrt(4.0) The patch is useful when argstype is not set. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2146> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com