From: espen Date: Sun, 27 Feb 2005 15:14:38 +0000 (+0000) Subject: Changed the way initargs are handled when merging slot options X-Git-Tag: clg-0-90~55 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/commitdiff_plain/c7a44ea995a62766a2e76f4053878bb43524c4fa?hp=d5e2ce7c724344629eaed6f1488c187c7716dd73 Changed the way initargs are handled when merging slot options --- 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))))