mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gmain: Add names to various GSources constructed in GLib
For the purposes of debugging, it is quite useful for every GSource to have a name set. Ensure that any GSource we construct inside GLib has a name set. For GSources which are then returned to the caller, this name can then be overridden with something even more useful by the caller. Since this data is only used for debugging, avoid doing any allocations for it; just use static strings. https://gitlab.gnome.org/GNOME/glib/issues/1175
This commit is contained in:
committed by
Philip Withnall
parent
cbfa776fc1
commit
208a6e815a
@@ -648,6 +648,8 @@ g_file_monitor_source_new (gpointer instance,
|
||||
source = g_source_new (&source_funcs, sizeof (GFileMonitorSource));
|
||||
fms = (GFileMonitorSource *) source;
|
||||
|
||||
g_source_set_name (source, "GFileMonitorSource");
|
||||
|
||||
g_mutex_init (&fms->lock);
|
||||
fms->instance = instance;
|
||||
fms->pending_changes = g_sequence_new (pending_change_free);
|
||||
|
Reference in New Issue
Block a user