[cffi-devel] ecl patch for callback support

Brian Spilsbury brian.spilsbury at gmail.com
Tue Sep 5 11:17:22 UTC 2006


Hello, a cursory glance at the archives didn't show a patch for ecl
callbacks, so perhaps the one included below will be useful.

This seems to make cl-cairo happier, anyhow. :)

Regards,
Brian.

####
--- cffi-ecl.lisp       2006-04-12 05:14:18.000000000 +0900
+++ cffi-ecl-fix.lisp   2006-09-05 20:09:17.000000000 +0900
@@ -228,6 +228,8 @@

 ;;;# Callbacks

+(defvar *callbacks* (make-hash-table))
+
 ;;; Create a package to contain the symbols for callback functions.
 ;;; We want to redefine callbacks with the same symbol so the internal
 ;;; data structures are reused.
@@ -257,7 +259,7 @@
       (gethash name *callbacks*)
     (unless winp
       (error "Undefined callback: ~S" name))
-    (ffi:callback name)))
+    (ffi:callback symbol)))

 ;;;# Foreign Globals



More information about the cffi-devel mailing list