Add g_main_context_ref_thread_default()

Add g_main_context_ref_thread_default(), which always returns a
reffed GMainContext, rather than sometimes returning a (non-reffed)
GMainContext, and sometimes returning NULL. This simplifies the
bookkeeping in any code that needs to keep a reference to the
thread-default context for a while.

https://bugzilla.gnome.org/show_bug.cgi?id=660994
This commit is contained in:
Dan Winship
2011-10-05 10:46:57 -04:00
parent d91769b641
commit 59f1f54655
15 changed files with 84 additions and 91 deletions

View File

@@ -485,6 +485,7 @@ g_main_context_invoke_full
<SUBSECTION>
g_main_context_get_thread_default
g_main_context_ref_thread_default
g_main_context_push_thread_default
g_main_context_pop_thread_default