Thomas Heller <[EMAIL PROTECTED]> added the comment:
> In the simplest case, convert
>
> import dl
> libc = dl.open("libc.so.6")
> iconv = libc.call("iconv_open", "ISO-8859-1", "ISO-8859-2")
> print(iconv)
>
> to
>
> import ctypes
> libc = ctypes.CDLL("libc.so.6")
> iconv = libc.iconv_open("ISO-8859-1", "ISO-8859-2")
> print(iconv)
>
> Notice that <dlobject>.call has up to 11 arguments, the first one being
> the function name.
>
> Thomas, is it the case that all calls to dl.call can be converted to a
> ctypes call without parameter conversion? dl supports these parameter
> types:
> - byte string, passed as char*
> - integers, passed as int
> - None, passed as NULL
Yes, this is correct.
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2470>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com