gmain: Officially deprecate g_main_context_wait()

It’s been de-facto deprecated for a long time, due to emitting a
critical warning when used in a non-internal context. Make that official
in the documentation and with a deprecation annotation.

Split the implementation into an internal helper and an external
wrapper, so the two remaining internal uses don’t emit deprecation
warnings.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/903
This commit is contained in:
Philip Withnall
2018-05-16 10:42:21 +01:00
parent cbfa776fc1
commit 7a34e396ae
2 changed files with 53 additions and 41 deletions

View File

@@ -376,7 +376,7 @@ GLIB_AVAILABLE_IN_ALL
void g_main_context_release (GMainContext *context);
GLIB_AVAILABLE_IN_ALL
gboolean g_main_context_is_owner (GMainContext *context);
GLIB_AVAILABLE_IN_ALL
GLIB_DEPRECATED_IN_2_58_FOR(g_main_context_is_owner)
gboolean g_main_context_wait (GMainContext *context,
GCond *cond,
GMutex *mutex);