New submission from STINNER Victor: ctypes doesn't support transparent conversion of double arguments. Example code:
from ctypes import cdll, c_double libm = cdll.LoadLibrary("libm.so") sqrt = libm.sqrt sqrt.argstype = (c_double,) sqrt.restype = c_double print sqrt(4.0) I wrote a patch to fix it: see attached patch ---------- components: Extension Modules files: ctypes_callproc_double.patch messages: 62581 nosy: haypo severity: normal status: open title: ctypes: support double for calling function type: rfe versions: Python 2.5 Added file: http://bugs.python.org/file9467/ctypes_callproc_double.patch __________________________________ 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