A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-March/124653.html below:

[Python-Dev] [docs] undocumented argtypes magic in ctypes?

[Python-Dev] [docs] undocumented argtypes magic in ctypes?Thomas Heller theller at ctypes.org
Thu Mar 7 12:37:14 CET 2013
Am 06.03.2013 18:19, schrieb Eli Bendersky:
>
>
>
> On Wed, Mar 6, 2013 at 8:33 AM, Andrew Svetlov <andrew.svetlov at gmail.com
> <mailto:andrew.svetlov at gmail.com>> wrote:
>
>     Looks like bug for me.
>
>
> ctypes seems to auto-convert arguments when argtypes is specified. This
> fact is documented. However, I'm not sure whether this auto-conversion
> is advanced enough to apply byref. Because otherwise, DIRENT is
> certainly not convertible to DIRENT_p

If argtypes specify a 'POINTER(X)' type as an argument, then ctypes
automatically applies byref() if an 'X' instance is passed to the
actual call.  This is by design, but I'm not sure if it is documented
or not.

However, if argtypes is not given, this does (and of course cannot) work.

Thomas


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4