From 138927bf39b224bbb998a85e8436d701e8f3f610 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Sun, 13 Sep 2009 04:30:48 +0400 Subject: [PATCH] define-g-object-class: do not specify :initarg for slots that can not be written to --- glib/gobject.generating.lisp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/glib/gobject.generating.lisp b/glib/gobject.generating.lisp index e7b57e6..6cd58e6 100644 --- a/glib/gobject.generating.lisp +++ b/glib/gobject.generating.lisp @@ -146,11 +146,15 @@ :allocation ,(if (gobject-property-p property) :gobject-property :gobject-fn) :g-property-type ,(if (gobject-property-p property) (gobject-property-type property) (cffi-property-type property)) :accessor ,(intern (format nil "~A-~A" (symbol-name class-name) (property-name property)) (symbol-package class-name)) - :initarg ,(intern (string-upcase (property-name property)) (find-package :keyword)) + ,@(when (if (gobject-property-p property) + t + (not (null (cffi-property-writer property)))) + `(:initarg + ,(intern (string-upcase (property-name property)) (find-package :keyword)))) ,@(if (gobject-property-p property) `(:g-property-name ,(gobject-property-gname property)) `(:g-getter ,(cffi-property-reader property) - :g-setter ,(cffi-property-writer property))))) + :g-setter ,(cffi-property-writer property))))) (defmacro define-g-object-class (g-type-name name (&key (superclass 'g-object) -- 1.7.10.4