[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

Matt Clarke report at bugs.python.org
Tue Apr 23 16:50:34 CEST 2013


Matt Clarke added the comment:

It seems that any argument greater than 8 bytes is automatically converted
to a references. Thus, changing to using ctypes.POINTER works. For example:

callback_t = ctypes.CFUNCTYPE(None, ctypes.POINTER(myst_args))

Quite a simple solution in the end. Is it worth documenting this on the
ctypes page?

Thanks for your help,

Matt

On 18 March 2013 15:19, Matt Clarke <report at bugs.python.org> wrote:

>
> Matt Clarke added the comment:
>
> Hi Amaury.
>
> They are both 12 bytes.
>
> Matt
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue17310>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17310>
_______________________________________


More information about the Python-bugs-list mailing list