ctypes: pointer to method
landa.martin at gmail.com
Fri Aug 6 22:18:37 CEST 2010
On Aug 6, 10:10 pm, Martin Landa <landa.mar... at gmail.com> wrote:
> Any idea how to solve it. Thanks, Martin
I overlooked note
Make sure you keep references to CFUNCTYPE objects as long as they are
used from C code. ctypes doesn’t, and if you don’t, they may be
garbage collected, crashing your program when a callback is made.
If I defined errtype and errfunc as global variable everything works.
Thanks again for your help. Martin
More information about the Python-list