Trying to get some c callbacks working and encountering some strange behavior...
\c void genericCallback(void (*tocall)(void))
c-function genericCallback genericCallback a -- void
c-callback blankCallback -- void
:noname .s s" 1 2 + ." evaluate ; blankCallback genericCallback
uncaught exception: Stack underflow
I initially thought to have the signature of genericCallback be func
-- void, but swig kept calling them addresses instead. Also it
produced the same result.
Looking at the generated wrapper code, I see that a new stackpointers
variable is created and used. It seems that whatever stack checking is
happening isn't taking this into account, coming to some incorrect
I came across this trying to evaluate input in glutIdleFunc so that I
could keep making changes while the program is running. Any advice on
how to make this use case work, that doesn't involve "just don't use
glut" (I'd love to be able to take it...)?