ts wrote:
> T> If so, I'm sure that the data struct can have [proc, proto], but 'func' of
> T> the struct sym_data is called by a library API. For example, I must pass
> T> 'func' of the struct sym_data to qsort(). I can't check if the sym_data
> 
>  When you pass `func' to qsort(), you access fatally to the struct sym_data 
>  and you know at this moment if it has [proc, proto], no ?

I know.

> T> has [proc, proto] or not when the function is called from qsort().
> 
>  use a thread local variable

There are some types of callback:
(a) callback called from a function such as qsort() that receives the callback.
(b) callback called after setting it like signal().
(c) callback called with user-data. (some GUI APIs,...)
(d) others?
I think we can remove restrictions regarding (a) and (c) in a lot of cases.
However, I can't find out any solution regarding (b).
We must consider that we need N callbacks in callback.func if functions
require N callbacks that have same prototype at the same time,
-- 
Takaaki Tateishi <ttate / ttsky.net>