From a0010ebc6fed79a09ca3da43d84fea224312ee37 Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Tue, 16 Feb 2010 00:10:36 +0300 Subject: [PATCH] More correct usage of CLOS MOP: add call to ENSURE-FINALIZED at start of MAKE-INSTANCE for GOBJECT-CLASS --- glib/gobject.foreign-gobject-subclassing.lisp | 7 ------- glib/gobject.meta.lisp | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/glib/gobject.foreign-gobject-subclassing.lisp b/glib/gobject.foreign-gobject-subclassing.lisp index 9edba2c..423214a 100644 --- a/glib/gobject.foreign-gobject-subclassing.lisp +++ b/glib/gobject.foreign-gobject-subclassing.lisp @@ -223,13 +223,6 @@ (foreign-slot-value query 'g-type-query :instance-size) (callback c-instance-init) nil)) (add-interfaces ,name)) - (defmethod initialize-instance :before ((object ,class) &key pointer) - (log-for :subclass "(initialize-instance ~A :pointer ~A) :before~%" object pointer) - (unless (or pointer (and (slot-boundp object 'gobject::pointer) - (gobject::pointer object))) - (log-for :subclass "calling g-object-constructor~%") - (setf (gobject::pointer object) (gobject::g-object-call-constructor ,name nil nil) - (gobject::g-object-has-reference object) t))) (progn ,@(iter (for (prop-name prop-type prop-accessor prop-reader prop-writer) in properties) (declare (ignorable prop-type)) diff --git a/glib/gobject.meta.lisp b/glib/gobject.meta.lisp index 120a958..fd24560 100644 --- a/glib/gobject.meta.lisp +++ b/glib/gobject.meta.lisp @@ -245,6 +245,7 @@ (defmethod make-instance ((class gobject-class) &rest initargs &key pointer) (log-for :subclass "(make-instance ~A ~{~A~^ ~})~%" class initargs) + (ensure-finalized class) (let ((*currently-making-object-p* t)) (if pointer (progn -- 1.7.10.4