gstring: Mark the return value from g_string_free() as nullable
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 14 Jan 2015 10:44:52 +0000 (10:44 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 3 Mar 2015 17:59:50 +0000 (17:59 +0000)
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

index f5890bf..dc60957 100644 (file)
@@ -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 *