From: Tony S. <ton...@gm...> - 2007-03-01 09:15:38
|
On 3/1/07, John Lenz <jl...@ma...> wrote: [...] > Chicken has a more difficult problem here, because chicken functions > never return. Of course, this can be simulated with longjmp (like some > of the chicken wrapper functions do), but this requires a garbage > collection. Not the fastest thing to do. If you notice the currently > generated SWIG functions correctly integrate with the chicken stack, and > do not return or force a garbage collection. Thanks. This leads to another question that has niggled me somewhat. Chicken provides two kinds of foreign function wrapper: foreign-lambda and foreign-safe-lambda. The latter calls the foreign function in such a manner as to permit callbacks to take place during the course of execution of the foreign function. Are swig calls also callback-safe? On the substance of your overall response, it's clear that I'll have to write my own function to wrap the pointer before passing it to the swig wrapper--at least for now. That's really what I was in the middle of doing when I remembered typemaps. Thanks for the clarification. |