From: Dmitry Kalyanov Date: Tue, 16 Nov 2010 09:12:26 +0000 (+0800) Subject: Added finalizing of all gtk+ classes at the end of compilation X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=c5b6d8264467314e22eb941bdc8e20fbf448d36f;p=cl-gtk2.git Added finalizing of all gtk+ classes at the end of compilation --- diff --git a/gtk/cl-gtk2-gtk.asd b/gtk/cl-gtk2-gtk.asd index 3d09695..c6c6d32 100644 --- a/gtk/cl-gtk2-gtk.asd +++ b/gtk/cl-gtk2-gtk.asd @@ -81,6 +81,7 @@ (:file "gtk.demo") (:file "gtk.timer") + (:file "gtk.finalize-classes") (:module "demo-files" :pathname "demo/" :components ((:plain-file "demo1" :type "ui") diff --git a/gtk/gtk.finalize-classes.lisp b/gtk/gtk.finalize-classes.lisp new file mode 100644 index 0000000..5080448 --- /dev/null +++ b/gtk/gtk.finalize-classes.lisp @@ -0,0 +1,12 @@ +(in-package :gtk) + +(defun finalize-subclasses (class) + ;(format t "Finalizing ~A~%" class) + (c2mop:ensure-finalized class) + (iter (for subclass in (c2mop:class-direct-subclasses class)) + (finalize-subclasses subclass))) + +(defun finalize-gtk-classes () + (finalize-subclasses (find-class 'gobject:g-object))) + +(finalize-gtk-classes)