From fb828801ba3c551f124fe875ada854f323dfe09a Mon Sep 17 00:00:00 2001 From: Dmitry Kalyanov Date: Tue, 16 Nov 2010 12:12:26 +0300 Subject: [PATCH] Added finalizing of all gtk+ classes at the end of compilation --- gtk/cl-gtk2-gtk.asd | 1 + gtk/gtk.finalize-classes.lisp | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 gtk/gtk.finalize-classes.lisp diff --git a/gtk/cl-gtk2-gtk.asd b/gtk/cl-gtk2-gtk.asd index c825c29..5371551 100644 --- a/gtk/cl-gtk2-gtk.asd +++ b/gtk/cl-gtk2-gtk.asd @@ -80,6 +80,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) -- 1.7.10.4