[cffi-devel] Re: Non-top level defcallback

Stephen Compall s11 at member.fsf.org
Tue May 22 23:34:48 UTC 2007


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.

-- 
;;; Stephen Compall ** http://scompall.nocandysw.com/blog **
Failure to imagine vast possibilities usually stems from a lack of
imagination, not a lack of possibility.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20070522/05135922/attachment.sig>


More information about the cffi-devel mailing list