On Sun, 2007-05-20 at 19:39 -0700, Tomas Melchior wrote:
What platforms/implementations support this? The manual only says "some Lisps". Also, is there anything analogous to lambda for defcallback?
To refer to the text:
*Portability note:* `defcallback' will not work correctly on some Lisps if it's not a top-level form.
The point of this note is to say that CFFI doesn't guarantee that it will work, much as doing anything not defined by ANSI Common Lisp isn't guaranteed to work in portable Common Lisp code. In fact, "some" may mean "none at all" now or at any future time. In other words, don't do it.
Please see Tutorial-Callbacks in the manual for a trivial workaround to get closures to run due to callbacks. You may not like it though.