ctypes: reference of a struct member?

ma mabdelkader at gmail.com
Fri May 1 14:57:03 EDT 2009


ctypes.byref() does not work for struct members.
Try it out.
class s(ctypes.Structure):
    _fields_ = [('x',ctypes.c_int)]

a = s()
ctypes.byref(a.x) //this won't work.



On Fri, May 1, 2009 at 2:28 PM, CTO <debatem1 at gmail.com> wrote:
> ctypes.byref()
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list