On Tue, 08 Apr 2003 01:10, Felix Winkelmann wrote:
Not exactly a problem, but you have to make ABSOLUTELY SURE
that the do_event() (in your example) is a `foreign-callback-lambda[*]'.
That's essential! `foreign-lambda*' is wrong.
Well, how about that. I changed my call of do_event to use:
(define wrapper-do-event
(foreign-callback-lambda void "do_event" c_pointer))
When I call this things work perfectly. When I use the SWIG wrapper
things fail. I guess the SWIG wrapper doesn't know that it's going to
call a Scheme callback so it has no idea to do this.
I guess there's no problem after all!
I've now got multiple OpenGL windows running with background threads in
the interpreter still operating at the same time, yay!
Many thanks for your help here Felix. I'm glad it was so easily sorted.
While I could be disappointed about the time I spent debugging, at least
I learnt a lot about the internals of the Chicken garbage collector!