From 5676656f5ce09de10f7c1d71a292812456769346 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Sat, 29 Aug 2009 23:17:13 +0400 Subject: [PATCH] Take :default-initargs into account when creating instances of gobject classes --- glib/gobject.meta.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/glib/gobject.meta.lisp b/glib/gobject.meta.lisp index 086a5ac..7fba65e 100644 --- a/glib/gobject.meta.lisp +++ b/glib/gobject.meta.lisp @@ -207,8 +207,11 @@ (progn (assert (= (length initargs) 2) nil "POINTER can not be combined with other initargs (~A)" initargs) (call-next-method)) - (let ((pointer (create-gobject-from-class-and-initargs class initargs))) - (apply #'call-next-method class :pointer pointer initargs)))) + (let* ((default-initargs (iter (for (arg value) in (class-default-initargs class)) + (nconcing (list arg value)))) + (effective-initargs (append initargs default-initargs)) + (pointer (create-gobject-from-class-and-initargs class effective-initargs))) + (apply #'call-next-method class :pointer pointer effective-initargs)))) (defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-property-effective-slot-definition)) (handler-case -- 1.7.10.4