Dear developers,

can closures be used as callbacks, i.e. will the following kind of code work?

(let ((ptr nil))
  (let ((a 3))    
    (defcallback add-a :int ((b :int))
      (+ a b))
    (setq ptr (callback add-a)))
  (c-function ptr))
 
Best regards
  Bruno Daniel
_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to