Nick Craig-Wood <n...@craig-wood.com> writes:

> ctypes could potentially note that function types don't have enough
> references to them when passed in as arguments to C functions?  It
> might slow it down microscopically but it would fix this problem.

Except that ctypes can't know the lifetime needed for the callbacks.  If
the callbacks are only used while the called function is executing (say,
perhaps for a progress indicator or internal completion callback) then
it's safe to create the function wrapper just within the function call.

-- David
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to