From c7a44ea995a62766a2e76f4053878bb43524c4fa Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 27 Feb 2005 15:14:38 +0000 Subject: [PATCH 1/1] Changed the way initargs are handled when merging slot options Organization: Straylight/Edgeware From: espen --- glib/gobject.lisp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/glib/gobject.lisp b/glib/gobject.lisp index b0ac68f..823a7ea 100644 --- a/glib/gobject.lisp +++ b/glib/gobject.lisp @@ -15,7 +15,7 @@ ;; License along with this library; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -;; $Id: gobject.lisp,v 1.32 2005/02/10 00:20:02 espen Exp $ +;; $Id: gobject.lisp,v 1.33 2005/02/27 15:14:38 espen Exp $ (in-package "GLIB") @@ -390,12 +390,15 @@ (defun slot-definition-from-property (class property &optional slot-name args) '(:construct t)) ;; initargs - ,@(when (or (member :construct flags) - (member :construct-only flags) - (member :writable flags)) - (list :initarg (intern (string slot-name) "KEYWORD"))) - ,@(cond - ((find :initarg args) (list :initarg (getf args :initarg)))) + ,@(if (find :initarg args) + (let ((initarg (getf args :initarg))) + (etypecase initarg + (null ()) + (symbol `(:initarg ,initarg)))) + (when (or (member :construct flags) + (member :construct-only flags) + (member :writable flags)) + (list :initarg (intern (string slot-name) "KEYWORD")))) :type ,slot-type :documentation ,documentation)))) -- [mdw]