Hi,

At Fri, 7 Jan 2005 19:37:31 +0900,
ts wrote in [ruby-core:04155]:
> 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 ?

qsort() passes only the pointers to elements to be compared.

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

The thread may differ from which the callback was
registered.

I agree that all functions using callback should give it a
particular parameter, but it's not always true actually.  It is
a flaw of the design of such functions, but not of DL.

-- 
Nobu Nakada