[cffi-devel] Defcallback calling into C
Martin Simmons
martin at lispworks.com
Wed Mar 26 22:11:01 UTC 2008
>>>>> On Tue, 25 Mar 2008 08:52:26 -0700, Luke J Crook said:
> Delivered-To: cffi-devel at common-lisp.net
>
> Does DEFCALLBACK support calling back into C from the Lisp side? One of
> the features of OpenRM is that it will call a callback when certain data
> structures are freed internally by the C library (for example a node in
> the scene graph, or vertex and color data shared between primitives
> within nodes.) Complex structures require that the appropriate C
> function is called.
I'm not quite sure what you are asking. DEFCALLBACK defines a callback
function, so you need to use DEFCFUN to define a Lisp function that can call
into C. Calling a function defined with DEFCFUN within the body of a
DEFCALLBACK should work.
> I am using CFFI version 0.9.2 from the Cliki and see the same error from
> Lispworks and SBCL.
What is the error? Can you get a backtrace?
__Martin
More information about the cffi-devel
mailing list