On 07/23/2011 11:19 PM, Bruno Haible wrote:
> The only inelegance is having > to code up a struct type to pass around the privdata argument even for > something as simple as passing data in and reading it out again.That's life, in C. A callback consists of a function pointer plus a privdata pointer, which is declared as 'void *' but actually some specialized pointer.
You could pass a typed structure and let the callee use container_of or similar macros.
Paolo