[glib] glist: Clarify how g_list_free_1() handles links



commit c6312daba0418e384b9ee64917861225a85edacf
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Dec 19 18:53:22 2014 +0000

    glist: Clarify how g_list_free_1() handles links
    
    It doesn’t, which is fine, but could be unexpected if undocumented.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741779

 glib/glist.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/glib/glist.c b/glib/glist.c
index 2f3a49b..1639a9f 100644
--- a/glib/glist.c
+++ b/glib/glist.c
@@ -186,7 +186,10 @@ g_list_free (GList *list)
  * g_list_free_1:
  * @list: a #GList element
  *
- * Frees one #GList element.
+ * Frees one #GList element, but does not update links from the next and
+ * previous elements in the list, so you should not call this function on an
+ * element that is currently part of a list.
+ *
  * It is usually used after g_list_remove_link().
  */
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]