[glib: 4/5] gprintf: Clarify error behaviour of g_vasprintf() in docs
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/5] gprintf: Clarify error behaviour of g_vasprintf() in docs
- Date: Thu, 10 Mar 2022 08:09:06 +0000 (UTC)
commit aa4385c1d97b36f1691fc58d2434bcc003a5a220
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Mar 9 18:19:05 2022 +0000
gprintf: Clarify error behaviour of g_vasprintf() in docs
Signed-off-by: Philip Withnall <pwithnall endlessos org>
glib/gprintf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/glib/gprintf.c b/glib/gprintf.c
index 0e094f00f..7a8803351 100644
--- a/glib/gprintf.c
+++ b/glib/gprintf.c
@@ -295,7 +295,8 @@ g_vsnprintf (gchar *string,
/**
* g_vasprintf:
- * @string: (not optional) (nullable): the return location for the newly-allocated string.
+ * @string: (not optional) (nullable): the return location for the newly-allocated string,
+ * which will be %NULL if (and only if) this function fails
* @format: (not nullable): a standard printf() format string, but notice
* [string precision pitfalls][string-precision]
* @args: the list of arguments to insert in the output.
@@ -312,7 +313,7 @@ g_vsnprintf (gchar *string,
*
* `glib/gprintf.h` must be explicitly included in order to use this function.
*
- * Returns: the number of bytes printed.
+ * Returns: the number of bytes printed, or `-1` on failure
*
* Since: 2.4
**/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]