[cells-gtk-cvs] CVS root/gtk-ffi
pdenno
pdenno at common-lisp.net
Sat Feb 11 03:41:05 UTC 2006
Update of /project/cells-gtk/cvsroot/root/gtk-ffi
In directory common-lisp:/tmp/cvs-serv31208/root/gtk-ffi
Modified Files:
gtk-definitions.lisp
Log Message:
Replaced some fgn-alloc fgn-free stuff with equivalent cffi.
--- /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-definitions.lisp 2004/12/05 06:31:14 1.2
+++ /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-definitions.lisp 2006/02/11 03:41:05 1.3
@@ -64,14 +64,15 @@
(def-struct g-value
(g-type (:array :int 16)))
+;;; POD variable capture!
(defmacro with-g-value ((var) &body body)
- `(let ((,var (ffx:fgn-alloc 'g-value 1 :with-g-value ',var)))
+ `(let ((,var (cffi:foreign-alloc 'g-value)))
(unwind-protect
(progn
(dotimes (n 16)
(setf (int-slot-indexed ,var 'g-value 'g-type n) 0))
, at body)
- (ffx:fgn-free ,var))))
+ (cffi:foreign-free ,var))))
(eval-when (compile load eval) (export 'with-g-value))
More information about the Cells-gtk-cvs
mailing list