From ec38c3b734c56a1f0ef7ec2a7d76e02dc6e83a1e Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Thu, 26 Feb 2009 02:04:08 +0300 Subject: [PATCH] Added :accessor option to g-boxed-ref' slots --- glib/gobject.foreign-gboxed.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glib/gobject.foreign-gboxed.lisp b/glib/gobject.foreign-gboxed.lisp index 994e759..a6525c3 100644 --- a/glib/gobject.foreign-gboxed.lisp +++ b/glib/gobject.foreign-gboxed.lisp @@ -289,14 +289,14 @@ (setf (gethash (pointer-address value) *boxed-ref-owner*) owner)))) (defun g-boxed-ref-slot->methods (class slot) - (bind (((slot-name &key reader writer type) slot)) + (bind (((slot-name &key reader writer type (accessor slot-name)) slot)) `(progn ,@(when reader - (list `(defmethod ,slot-name ((object ,class)) + (list `(defmethod ,accessor ((object ,class)) ,(if (stringp reader) `(foreign-funcall ,reader :pointer (pointer object) ,type) `(,reader object))))) ,@(when writer - (list `(defmethod (setf ,slot-name) (new-value (object ,class)) + (list `(defmethod (setf ,accessor) (new-value (object ,class)) ,(if (stringp writer) `(foreign-funcall ,writer :pointer (pointer object) ,type new-value) `(,writer new-value object)))))))) -- 1.7.10.4