Re: glib_debug_objects breakage



Alexander Larsson <alla lysator liu se> writes:

> If glib is compiled with --enable-debug=no gtk fails to link. The reason
> is that gtk/gtktypeutils.c accesses glib_debug_object, which is not
> compiled into glib if debugging is disabled.
> 
> Here is the simplest patch to fix this. Can I commit it?

This is fine - as an established principle, the set of exported
symbols from GLib/GTK+ should not depend on how it is configured.

Even for hack-arounds like this. (If you want to add a bugzilla bug
corresponding to the comment 'We need an actual method for handling
debug in GLib', that would be useful.)

Regards,
                                        Owen
 
> Index: gobject/gobject.c
> ===================================================================
> RCS file: /cvs/gnome/glib/gobject/gobject.c,v
> retrieving revision 1.21
> diff -u -p -r1.21 gobject.c
> --- gobject/gobject.c	2000/12/29 02:16:51	1.21
> +++ gobject/gobject.c	2001/01/02 11:29:48
> @@ -133,13 +133,14 @@ static gulong	         gobject_signals[L
> 
> 
>  /* --- functions --- */
> -#ifdef	G_ENABLE_DEBUG
>  /* We need an actual method for handling debug keys in GLib.
>   * For now, we'll simply use, as a method
>   * 'extern gboolean glib_debug_objects'
>   */
> -static volatile GObject *glib_trap_object_ref = NULL;
>  gboolean glib_debug_objects = FALSE;
> +
> +#ifdef	G_ENABLE_DEBUG
> +static volatile GObject *glib_trap_object_ref = NULL;
>  static guint		  debug_objects_count = 0;
>  static GHashTable	 *debug_objects_ht = NULL;
>  static void
> 
> / Alex




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