[glib: 1/2] Update g_source_remove doc comment: the function doesn't always return TRUE
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] Update g_source_remove doc comment: the function doesn't always return TRUE
- Date: Sun, 10 Oct 2021 16:10:47 +0000 (UTC)
commit a3ac24c20d826921f8bc36bb732ee9c07d333815
Author: Guillaume Gomez <guillaume1 gomez gmail com>
Date: Sun Oct 10 12:45:05 2021 +0000
Update g_source_remove doc comment: the function doesn't always return TRUE
This comment was added in a919be3d in 2013. The function basically looked the same
as now at that point. g_main_context_find_source_by_id() can clearly return NULL if
the source id is invalid, so unclear where this comes from? The function in
question are approximately the same since e2fd4e2b in 2000.
However back then g_main_context_find_source_by_id() would actually always return
the last source if there was none with the given source id (wat, that's clearly
unintended?). This was changed in 393503ba in 2014, arguably an API change of that
function but more arguably a bugfix :)
So for a short time between 2013 and 2014, that comment was correct. Now it is not
anymore and can be removed.
glib/gmain.c | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index ba8e0b08c..ffc21f89b 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2526,8 +2526,6 @@ g_main_context_find_source_by_user_data (GMainContext *context,
* is called on its (now invalid) source ID. This source ID may have
* been reissued, leading to the operation being performed against the
* wrong source.
- *
- * Returns: For historical reasons, this function always returns %TRUE
**/
gboolean
g_source_remove (guint tag)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]