[Ecls-list] Callbacks in ECL
Goffioul Michael
goffioul at imec.be
Wed Oct 12 06:37:11 UTC 2005
> I am not sure I understand this. The problem of callbacks, as I
> understood it, is to produce _arbitrary_ C functions with any given
> signature. I.e. functions like
> int mycallback(int a, int b)
> void mycallback(void *closure_data)
> ...
> For this you need the type of code I committed already, and this is
> precisely the type of callbacks that CFFI produces (and now also ECL)
Indeed, but I was trying to solve that problem at run-time, without the
need of a compilation step. In other words, do the counterpart of DFFI.
> I wonder if this is actually needed in real life. I have never
> personally found this in my life because C/C++ programmers typically
> know that such a construct is probably not reentrant. Am I wrong? :-/
I admit I'm suffering a SEGFAULT in the full Win32 test case (I still
have to investigate), but I know that at least the callback has been
called re-entrantly up to level 3 without segfault.
Michael.
More information about the ecl-devel
mailing list