[gtk-cffi-cvs] CVS gtk-cffi/gdk

CVS User rklochkov rklochkov at common-lisp.net
Fri Aug 24 19:27:54 UTC 2012


Update of /project/gtk-cffi/cvsroot/gtk-cffi/gdk
In directory tiger.common-lisp.net:/tmp/cvs-serv31128/gdk

Modified Files:
	color.lisp event.lisp pango.lisp 
Log Message:
Fixed CFFI-OBJECTS:FREE-PTR generic usage (now specialized with EQL)


--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/color.lisp	2012/08/19 16:22:30	1.8
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/color.lisp	2012/08/24 19:27:54	1.9
@@ -9,8 +9,7 @@
 
 (defcfun gdk-color-parse :boolean (str :string) 
          (color (:pointer (:struct color-struct))))
-(defcfun gdk-color-to-string :string 
-  (color (:pointer (:struct color-struct))))
+(defcfun gdk-color-to-string :string (color (:pointer (:struct color-struct))))
 (defcfun gdk-color-free :void (color :pointer))
 
 (define-foreign-type color-cffi (freeable)
@@ -18,7 +17,7 @@
   (:actual-type :pointer)
   (:simple-parser pcolor))
 
-(defmethod free-ptr ((class color-cffi) ptr)
+(defmethod free-ptr ((class (eql 'color-cffi)) ptr)
   (gdk-color-free ptr))
 
 (defmethod translate-to-foreign (value (type color-cffi))
@@ -50,7 +49,7 @@
 (defcfun gdk-rgba-to-string :string (color (:pointer (:struct rgba-struct))))
 (defcfun gdk-rgba-free :void (color :pointer))
 
-(defmethod free-ptr ((class rgba-cffi) ptr)
+(defmethod free-ptr ((class (eql 'rgba-cffi)) ptr)
   (gdk-rgba-free ptr))
 
 (defmethod translate-to-foreign (value (type rgba-cffi))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/event.lisp	2011/09/11 15:48:21	1.3
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/event.lisp	2012/08/24 19:27:54	1.4
@@ -348,7 +348,7 @@
           (t 'event-any))))
 
 (defmethod get-slot ((event event) field)
-  (foreign-slot-value (pointer event) (event-type event)
+  (foreign-slot-value (pointer event) (list :struct (event-type event))
                       (find-symbol (string field) :gdk-cffi)))
 
 (defun parse-event (ev-pointer field)
--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/pango.lisp	2012/08/19 16:22:30	1.9
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/pango.lisp	2012/08/24 19:27:54	1.10
@@ -34,7 +34,7 @@
   (:actual-type :pointer)
   (:simple-parser font))
 
-(defmethod free-ptr ((type font) ptr)
+(defmethod free-ptr ((type (eql 'font)) ptr)
   (pango-font-description-free ptr))
 
 (defmethod translate-to-foreign (value (type font))
@@ -115,7 +115,7 @@
 (defcfun pango-tab-array-get-positions-in-pixels :boolean (tab-array :pointer))
 (defcfun pango-tab-array-free :void (tab-array :pointer))
 
-(defmethod free-ptr ((type tab-array) ptr)
+(defmethod free-ptr ((type (eql 'tab-array)) ptr)
   (pango-tab-array-free ptr))
 
 
@@ -333,7 +333,7 @@
 (defcfun pango-attr-list-filter :pointer 
   (ptr :pointer) (func :pointer) (data :pointer))
 
-(defmethod free-ptr ((type attr-list) ptr)
+(defmethod free-ptr ((type (eql 'attr-list)) ptr)
   (pango-attr-list-unref ptr))
 
 (defvar *attr-list* nil)





More information about the gtk-cffi-cvs mailing list