mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
dist fixes.
Thu Jul 6 15:30:27 2000 Owen Taylor <otaylor@redhat.com> * Makefile.am (EXTRA_DIST): dist fixes. * gobject.c: Add a global variable glib_debug_objects (not in header file) to control object tracing.
This commit is contained in:
parent
8e881830ae
commit
ae13475277
@ -1,3 +1,10 @@
|
|||||||
|
Thu Jul 6 15:30:27 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.am (EXTRA_DIST): dist fixes.
|
||||||
|
|
||||||
|
* gobject.c: Add a global variable glib_debug_objects
|
||||||
|
(not in header file) to control object tracing.
|
||||||
|
|
||||||
2000-07-01 Tor Lillqvist <tml@iki.fi>
|
2000-07-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gobject.def: Update added and renamed entry points.
|
* gobject.def: Update added and renamed entry points.
|
||||||
|
@ -63,10 +63,12 @@ gobject_extra_sources = @STRIP_BEGIN@ \
|
|||||||
gobject_h_sources = $(gobject_private_h_sources) $(gobject_public_h_sources) # $(gobject_built_public_sources)
|
gobject_h_sources = $(gobject_private_h_sources) $(gobject_public_h_sources) # $(gobject_built_public_sources)
|
||||||
libgobjectinclude_HEADERS = $(gobject_public_h_sources) # $(gobject_built_public_sources)
|
libgobjectinclude_HEADERS = $(gobject_public_h_sources) # $(gobject_built_public_sources)
|
||||||
libgobject_la_SOURCES = $(gobject_c_sources)
|
libgobject_la_SOURCES = $(gobject_c_sources)
|
||||||
MAINTAINERCLEANFILES += # $(gobject_built_public_sources) $(gobject_built_sources)
|
MAINTAINERCLEANFILES +=
|
||||||
|
# $(gobject_built_public_sources) $(gobject_built_sources)
|
||||||
EXTRA_HEADERS +=
|
EXTRA_HEADERS +=
|
||||||
EXTRA_DIST += $(gobject_private_h_sources)
|
EXTRA_DIST += $(gobject_private_h_sources)
|
||||||
EXTRA_DIST += $(gobject_extra_sources) # $(gobject_built_sources) $(gobject_built_public_sources)
|
EXTRA_DIST += $(gobject_extra_sources)
|
||||||
|
# $(gobject_built_sources) $(gobject_built_public_sources)
|
||||||
|
|
||||||
#
|
#
|
||||||
# programs to compile and install
|
# programs to compile and install
|
||||||
@ -81,11 +83,11 @@ gobject_query_LDADD = $(progs_LDADD)
|
|||||||
#
|
#
|
||||||
# auxillary files
|
# auxillary files
|
||||||
#
|
#
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
TODO \
|
makefile.mingw \
|
||||||
makefile.mingw \
|
makefile.mingw.in \
|
||||||
makefile.mingw.in \
|
gobject.def \
|
||||||
gobject.rc \
|
gobject.rc \
|
||||||
gobject.rc.in
|
gobject.rc.in
|
||||||
|
|
||||||
gobject.rc: $(top_builddir)/config.status $(top_srcdir)/gobject/gobject.rc.in
|
gobject.rc: $(top_builddir)/config.status $(top_srcdir)/gobject/gobject.rc.in
|
||||||
|
@ -64,6 +64,13 @@ static GHashTable *param_spec_hash_table = NULL;
|
|||||||
|
|
||||||
/* --- functions --- */
|
/* --- functions --- */
|
||||||
#ifdef DEBUG_OBJECTS
|
#ifdef DEBUG_OBJECTS
|
||||||
|
|
||||||
|
/* 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'
|
||||||
|
*/
|
||||||
|
gboolean glib_debug_objects = FALSE;
|
||||||
|
|
||||||
static guint debug_objects_count = 0;
|
static guint debug_objects_count = 0;
|
||||||
static GHashTable *debug_objects_ht = NULL;
|
static GHashTable *debug_objects_ht = NULL;
|
||||||
static void
|
static void
|
||||||
@ -81,10 +88,13 @@ debug_objects_foreach (gpointer key,
|
|||||||
static void
|
static void
|
||||||
debug_objects_atexit (void)
|
debug_objects_atexit (void)
|
||||||
{
|
{
|
||||||
if (debug_objects_ht)
|
if (glib_debug_objects)
|
||||||
{
|
{
|
||||||
g_message ("stale GObjects: %u", debug_objects_count);
|
if (debug_objects_ht)
|
||||||
g_hash_table_foreach (debug_objects_ht, debug_objects_foreach, NULL);
|
{
|
||||||
|
g_message ("stale GObjects: %u", debug_objects_count);
|
||||||
|
g_hash_table_foreach (debug_objects_ht, debug_objects_foreach, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif DEBUG_OBJECTS
|
#endif DEBUG_OBJECTS
|
||||||
@ -239,10 +249,13 @@ g_object_do_init (GObject *object)
|
|||||||
object->qdata = NULL;
|
object->qdata = NULL;
|
||||||
|
|
||||||
#ifdef DEBUG_OBJECTS
|
#ifdef DEBUG_OBJECTS
|
||||||
if (!debug_objects_ht)
|
if (glib_debug_objects)
|
||||||
debug_objects_ht = g_hash_table_new (g_direct_hash, NULL);
|
{
|
||||||
debug_objects_count++;
|
if (!debug_objects_ht)
|
||||||
g_hash_table_insert (debug_objects_ht, object, object);
|
debug_objects_ht = g_hash_table_new (g_direct_hash, NULL);
|
||||||
|
debug_objects_count++;
|
||||||
|
g_hash_table_insert (debug_objects_ht, object, object);
|
||||||
|
}
|
||||||
#endif DEBUG_OBJECTS
|
#endif DEBUG_OBJECTS
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,10 +288,13 @@ g_object_do_finalize (GObject *object)
|
|||||||
g_datalist_clear (&object->qdata);
|
g_datalist_clear (&object->qdata);
|
||||||
|
|
||||||
#ifdef DEBUG_OBJECTS
|
#ifdef DEBUG_OBJECTS
|
||||||
g_assert (g_hash_table_lookup (debug_objects_ht, object) == object);
|
if (glib_debug_objects)
|
||||||
|
{
|
||||||
g_hash_table_remove (debug_objects_ht, object);
|
g_assert (g_hash_table_lookup (debug_objects_ht, object) == object);
|
||||||
debug_objects_count--;
|
|
||||||
|
g_hash_table_remove (debug_objects_ht, object);
|
||||||
|
debug_objects_count--;
|
||||||
|
}
|
||||||
#endif DEBUG_OBJECTS
|
#endif DEBUG_OBJECTS
|
||||||
|
|
||||||
g_type_free_instance ((GTypeInstance*) object);
|
g_type_free_instance ((GTypeInstance*) object);
|
||||||
|
Loading…
Reference in New Issue
Block a user