[gtk/wip/otte/whatever: 9/15] stringlist: Clarify docs for gtk_string_list_get_string()



commit 0bbd083d799dfb47f1865bf4146321b72d5cd333
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jun 30 19:35:43 2020 +0200

    stringlist: Clarify docs for gtk_string_list_get_string()
    
    Make sure it's obvious that it behaves like g_list_model_get_item() and
    returns NULL for pos >= n_items.

 gtk/gtkstringlist.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstringlist.c b/gtk/gtkstringlist.c
index 70290fe24f..e58a0fe6b6 100644
--- a/gtk/gtkstringlist.c
+++ b/gtk/gtkstringlist.c
@@ -588,8 +588,8 @@ gtk_string_list_remove (GtkStringList *self,
  * @self: a #GtkStringList
  * @position: the position to get the string for
  *
- * Gets the string that is at @position in @self. @position
- * must be smaller than the current length of the list.
+ * Gets the string that is at @position in @self. If @self
+ * does not contain @position items, %NULL is returned.
  *
  * This function returns the const char *. To get the
  * object wrapping it, use g_list_model_get_item().


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