[cffi-devel] Re: unnamed callback (closures?)
James Bielman
jamesjb at jamesjb.com
Wed Feb 1 09:25:08 UTC 2006
Jan Rychter <jan at rychter.com> writes:
> I mostly develop on SBCL/x86 and ECL, so even if a solution worked
> on these platforms only, I'd be really happy.
If all else failed, you could resort to passing something like:
#+sbcl (alien-sap (alien-lambda ...))
#+ecl #| whatever is appropriate for an ecl anon callback |#
as a pointer to a CFFI function.
While I'd like to see some kind of CALLBACK-LAMBDA as the base
primitive in CFFI-SYS for callbacks someday, the implementation
support for this is pretty minimal.
I think it boils down to: how many Lisps need to support something
before we consider adding it an optional feature to CFFI-SYS? If
there's enough support, what about exporting some sort of
CFFI-FEATURES:NO-ANONYMOUS-CALLBACKS feature and adding
CALLBACK-LAMBDA to CFFI-SYS for the Lisps that can do it?
James
More information about the cffi-devel
mailing list