Comment 1 for bug 1834126

Revision history for this message
Luís Oliveira (luismbo) wrote :

若凡你好!

Some Lisps support anonymous callbacks (e.g., SBCL's sb-alien:alien-lambda) but not all. Nevertheless, it'd be nice for CFFI to support that when possible. Marking this bug as wishlist item.

You may be able to work around this by reusing the same callback each time and using the dynamic scope. Something along these lines:

  (defvar *foo*)

  (defcallback bar ... (do-something-with *foo*))

Then:

  (let ((*foo* <something>))
    (your-foreign-funcation (callback bar)))

BTW, have you seen Liam Healy's GSLL <https://common-lisp.net/project/gsll/>?