[cffi-devel] `lambda-callback'

Lars Rune Nøstdal larsnostdal at gmail.com
Thu Apr 27 06:14:55 UTC 2006


Hello cffi'ers,
I've been using this lately:


  (defvar *lambda-callbacks* nil
    "TODO: Clean up later somehow?")

  (defmacro lambda-callback (return-type args &body body)
    (let ((name (read-from-string (symbol-name (gensym)))))
      `(progn
         (defcallback ,name ,return-type ,args
           , at body)
         (push ',name *lambda-callbacks*)
         (callback ,name))))


..maybe something like this could be included in cffi? :)

-- 
mvh,
Lars Rune Nøstdal
http://lars.nostdal.org/




More information about the cffi-devel mailing list