[glib] gstring: Mark the return value from g_string_free() as nullable



commit f829bde76acf0d139dcbe4b81b3721d9e929fbee
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Jan 14 10:44:52 2015 +0000

    gstring: Mark the return value from g_string_free() as nullable
    
    It’s NULL iff free_segment is TRUE, so the annotation doesn’t quite
    capture all the function definition, but is a safe over-estimate of the
    return value’s nullability.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719966

 glib/gstring.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gstring.c b/glib/gstring.c
index f5890bf..dc60957 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -203,7 +203,7 @@ g_string_new_len (const gchar *init,
  * it's %FALSE, the caller gains ownership of the buffer and must
  * free it after use with g_free().
  *
- * Returns: the character data of @string
+ * Returns: (nullable): the character data of @string
  *          (i.e. %NULL if @free_segment is %TRUE)
  */
 gchar *


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