chiark / gitweb /
Changed the way initargs are handled when merging slot options
authorespen <espen>
Sun, 27 Feb 2005 15:14:38 +0000 (15:14 +0000)
committerespen <espen>
Sun, 27 Feb 2005 15:14:38 +0000 (15:14 +0000)
glib/gobject.lisp

index b0ac68f1f2d0ff66e34f769f7c557e7535a86ff6..823a7eab5be8729bd7e1fe7cebe466b575fb572e 100644 (file)
@@ -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))))