gstrfuncs: Add missing annotations to g_strdup_vprintf()

It’s possible for the function to fail for the same reasons
`g_vasprintf()` would fail.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3187
This commit is contained in:
Philip Withnall 2023-11-27 11:15:43 +00:00
parent 3c6052f318
commit c56bc6d8d9

View File

@ -542,7 +542,7 @@ g_stpcpy (gchar *dest,
* See also g_vasprintf(), which offers the same functionality, but * See also g_vasprintf(), which offers the same functionality, but
* additionally returns the length of the allocated string. * additionally returns the length of the allocated string.
* *
* Returns: a newly-allocated string holding the result * Returns: (nullable) (transfer full): a newly-allocated string holding the result
*/ */
gchar* gchar*
g_strdup_vprintf (const gchar *format, g_strdup_vprintf (const gchar *format,
@ -570,7 +570,7 @@ g_strdup_vprintf (const gchar *format,
* contains `%lc` or `%ls` conversions, which can fail if no multibyte * contains `%lc` or `%ls` conversions, which can fail if no multibyte
* representation is available for the given character. * representation is available for the given character.
* *
* Returns: a newly-allocated string holding the result * Returns: (nullable) (transfer full): a newly-allocated string holding the result
*/ */
gchar* gchar*
g_strdup_printf (const gchar *format, g_strdup_printf (const gchar *format,