[gtk-cffi-cvs] CVS gtk-cffi/cffi
CVS User rklochkov
rklochkov at common-lisp.net
Mon Aug 8 15:02:01 UTC 2011
Update of /project/gtk-cffi/cvsroot/gtk-cffi/cffi
In directory tiger.common-lisp.net:/tmp/cvs-serv32663/cffi
Modified Files:
object.lisp
Log Message:
Major commit. Now all exerices ex*.lisp work perfectly.
Added lisp-array model for tree-view (see ex9).
--- /project/gtk-cffi/cvsroot/gtk-cffi/cffi/object.lisp 2011/04/25 19:16:08 1.1.1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/cffi/object.lisp 2011/08/08 15:02:01 1.2
@@ -93,9 +93,12 @@
;; converts class object to pointer and vice versa
(define-foreign-type cffi-object ()
- ()
- (:actual-type :pointer)
- (:simple-parser object))
+ ((class :initarg :class :accessor obj-class))
+ (:actual-type :pointer))
+; (:simple-parser object))
+
+(define-parse-method object (&optional class)
+ (make-instance 'cffi-object :class class))
(defmethod translate-to-foreign ((value null) (type cffi-object))
(null-pointer))
@@ -108,7 +111,7 @@
value)
-(defmethod translate-from-foreign (ptr (name cffi-object))
- (object ptr))
+(defmethod translate-from-foreign (ptr (cffi-object cffi-object))
+ (object ptr :class (obj-class cffi-object)))
More information about the gtk-cffi-cvs
mailing list