Added finalizing of all gtk+ classes at the end of compilation
authorDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Tue, 16 Nov 2010 09:12:26 +0000 (17:12 +0800)
committerAndrey Kutejko <andy128k@gmail.com>
Tue, 16 Nov 2010 10:12:48 +0000 (18:12 +0800)
gtk/cl-gtk2-gtk.asd
gtk/gtk.finalize-classes.lisp [new file with mode: 0644]

index 3d09695..c6c6d32 100644 (file)
@@ -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 (file)
index 0000000..5080448
--- /dev/null
@@ -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)