GSource: add g_source_set_name, g_source_get_name, g_source_set_name_by_id

These allow applications to give meaningful names to their sources.
Source names can then be used for debugging and profiling, for
example with systemtap or gdb.

https://bugzilla.gnome.org/show_bug.cgi?id=606044
This commit is contained in:
Havoc Pennington
2010-04-20 17:47:44 -04:00
committed by Colin Walters
parent e5696c282e
commit 6b53e4826f
2 changed files with 9 additions and 2 deletions

View File

@@ -1415,7 +1415,10 @@ g_source_unref_internal (GSource *source,
if (source->source_funcs->finalize)
source->source_funcs->finalize (source);
g_free (source->name);
source->name = NULL;
g_slist_free (source->poll_fds);
source->poll_fds = NULL;
g_free (source);