On Feb 23, 2009, at 10:11 PM, Anatoly A. Kazantsev wrote:

> On Tue, 24 Feb 2009 00:43:33 +1300
> Greg Ewing <[email protected]> wrote:
>
>> Anatoly A. Kazantsev wrote:
>>
>>> Additional parameter 'void *user_data' is used in the example for  
>>> this purpose.
>>>
>>> But I can't modify 'fshelp_open_fn_t' function type.
>>
>> What's the 'void *cookie'? Is it an arbitrary pointer
>> that you can use for your own purposes? If so, use
>> it the same way as the user_data in the example.
>
> Yes, I can use this pointer :-)
>
> But how can I wrap callbacks without such pointers. Or this  
> pointers is a 'good'
> practise in designing of callback functions?

Pointers are the only way to pass around functions in C. Pointers  
aren't bad, they're just powerful and potentially unforgiving.

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to