gprintf: Clarify error behaviour of g_vasprintf() in docs

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-03-09 18:19:05 +00:00
parent d6ad10404f
commit aa4385c1d9

View File

@ -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
**/