[glib] gmain: Clarify documentation of g_source_remove()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gmain: Clarify documentation of g_source_remove()
- Date: Fri, 1 Dec 2017 10:24:58 +0000 (UTC)
commit 532f1edd88aa32825cc5aef6c4df6fbd83c7e3a8
Author: Philip Withnall <withnall endlessm com>
Date: Fri Dec 1 10:24:09 2017 +0000
gmain: Clarify documentation of g_source_remove()
To try and prevent a repeat of
https://stackoverflow.com/q/47569812/2931197.
Signed-off-by: Philip Withnall <withnall endlessm com>
Reviewed-by: nobody
glib/gmain.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index f30a6ab..e963feb 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2322,17 +2322,15 @@ g_main_context_find_source_by_user_data (GMainContext *context,
* g_source_remove:
* @tag: the ID of the source to remove.
*
- * Removes the source with the given id from the default main context.
+ * Removes the source with the given ID from the default main context. You must
+ * use g_source_destroy() for sources added to a non-default main context.
*
- * The id of a #GSource is given by g_source_get_id(), or will be
+ * The ID of a #GSource is given by g_source_get_id(), or will be
* returned by the functions g_source_attach(), g_idle_add(),
* g_idle_add_full(), g_timeout_add(), g_timeout_add_full(),
* g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and
* g_io_add_watch_full().
*
- * See also g_source_destroy(). You must use g_source_destroy() for sources
- * added to a non-default main context.
- *
* It is a programmer error to attempt to remove a non-existent source.
*
* More specifically: source IDs can be reissued after a source has been
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]