[cells-gtk-cvs] CVS root/gtk-ffi
pdenno
pdenno at common-lisp.net
Sat Feb 11 03:40:26 UTC 2006
Update of /project/cells-gtk/cvsroot/root/gtk-ffi
In directory common-lisp:/tmp/cvs-serv31188/root/gtk-ffi
Modified Files:
gtk-core.lisp
Log Message:
Replaced some fgn-alloc fgn-free stuff with equivalent cffi.
--- /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-core.lisp 2006/01/03 19:05:17 1.5
+++ /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-core.lisp 2006/02/11 03:40:26 1.6
@@ -49,7 +49,7 @@
(gdk-flush ()))
(def-union g-value-data
- (v-int :int)
+ (v-int :int)
(v-uint :unsigned-int)
(v-long :long)
(v-ulong :unsigned-long)
@@ -69,14 +69,14 @@
(defun call-with-g-value (fn)
(declare (optimize (speed 3) (safety 0) (space 0)))
- (let ((gva (ffx:fgn-alloc 'g-value 1 :with-g-value)))
+ (let ((gva (cffi:foreign-alloc 'g-value)))
(unwind-protect
(dotimes (n 16)
- (let ((gv (ffx:ff-elt gva 'g-value 0)))
- (let ((ns (get-slot-pointer gv 'g-value 'g-type)))
- (setf (deref-array ns '(:array :int) n) 0))))
+ (let* ((gv (cffi:mem-aref gva 'g-value 0))
+ (ns (get-slot-pointer gv 'g-value 'g-type)))
+ (setf (cffi:mem-aref ns ':int n) 0))))
(funcall fn gva)
- (ffx:fgn-free gva))))
+ (cffi:foreign-free gva)))
(eval-when (compile load eval) (export 'with-g-value))
More information about the Cells-gtk-cvs
mailing list