[cffi-devel] defcallback has to be invoked on every run? yes? no?
![](https://secure.gravatar.com/avatar/ae26b49096d78856a33e8ae9b61037c3.jpg?s=120&d=mm&r=g)
Found this comment in some code I am porting to CFFI: ; Seems like ff-defun-callable should be executed every time. ; In OpenMCL, loading .dfsl file is not enough. ff-defun-callable was my creation when UFFI did not handle callbacks. It was like UFFI in that it Just Wrapped native Lisp implementation FFI callback syntax. Uhhhh... if I am using CFFI, can I just code defcallback at the toplevel and invoke get-callback at runtime when passing the callback to the library? Existing code calls a defun which executes ff-defun-callable each time the app runs. kt
![](https://secure.gravatar.com/avatar/326b108ffcc42f27628703b0c11ed239.jpg?s=120&d=mm&r=g)
On 2006-maj-19, at 22:39, Ken Tilton wrote:
Uhhhh... if I am using CFFI, can I just code defcallback at the toplevel and invoke get-callback at runtime when passing the callback to the library?
Yes. The callback tests would fail (when running a fresh image with pre-compiled fasls) if this didn't work. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
participants (2)
-
Ken Tilton
-
Luís Oliveira