Le Wednesday 19 November 2008 15:39:43 Martin (gzlist), vous avez écrit :
> This is covered in the documentation, isn't it?
>
> <http://docs.python.org/library/ctypes.html#callback-functions>
>
> Important note for callback functions:
>
> 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.

Oh yes, I remember this problem... I took me hours/days to understand the 
problem.

Is there a FAQ for ctypes? To list the most common problems. The bug is in the 
documentation :-)

Victor
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to