>>>>> "Luís" == Luís Oliveira <[EMAIL PROTECTED]> writes:
 Luís> Jan Rychter <[EMAIL PROTECTED]> writes:
 >> Apart from a plea for suggestions, this brings me back to my
 >> original question -- can we expect any support for anonymous
 >> callbacks (closures as callback functions) in CFFI, at least on SBCL
 >> to begin with?

 Luís> I'm pretty sure we could support anonymous callbacks, on SBCL and
 Luís> CLISP anyway. Do any other Lisps support this?

Quick googling of Lispworks and AllegroCL documentation seems to
indicate that in both cases one defines externally callable functions
with a macro. No mention of closures as callbacks. That would seem to
indicate that at least in these cases it isn't supported, but one would
have to ask the vendors to be sure.

ECL has si::make-dynamic-callback and would be able to support this, in
fact it seems that even defcallback expands to

[...]
          `(si::make-dynamic-callback
            #'(ext::lambda-block ,name ,arg-names ,@body)
            ',name ',ret-type ',arg-types ,call-type)))
[...]

So, perhaps it is worth implementing as an optional feature. Hopefully
other implementations will follow suit.

--J.
_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to