guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: entries and guile-gui


From: Kevin Ryde
Subject: Re: entries and guile-gui
Date: Thu, 22 Feb 2007 10:42:51 +1100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

I wrote:
>
> I'm about the check in the following,

Actually, I guess it needs to check for GtkObject, since there's a few
GObject derived bits in gdk.

--- guile-gtk.c.~1.123.~        2006-12-22 19:45:08.000000000 +1100
+++ guile-gtk.c 2007-02-22 10:40:57.000000000 +1100
@@ -37,6 +37,20 @@
 #include "compat.h"
 
 
+/* g_object_ref_sink is new in glib some time post 2.6.
+   In the past the floating reference stuff was only within GtkObject. */
+#if ! HAVE_G_OBJECT_REF_SINK
+static gpointer
+g_object_ref_sink (gpointer object)
+{
+  g_object_ref (G_OBJECT (object));
+  if (GTK_IS_OBJECT (object) && GTK_OBJECT_FLOATING (object))
+    gtk_object_sink (GTK_OBJECT (object));
+  return object;
+}
+#endif
+
+
 /* Define this to enable some output during GC and other interesting
    actions. */
 #undef DEBUG_PRINT

reply via email to

[Prev in Thread] Current Thread [Next in Thread]