grefstring: Add missing documentation for GRefString typedef

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2018-11-28 12:14:20 +00:00
parent 1fa24a6852
commit 68ea997eff

View File

@ -39,6 +39,19 @@ void g_ref_string_release (char *str);
GLIB_AVAILABLE_IN_2_58 GLIB_AVAILABLE_IN_2_58
gsize g_ref_string_length (char *str); gsize g_ref_string_length (char *str);
/**
* GRefString:
*
* A typedef for a reference-counted string. A pointer to a #GRefString can be
* treated like a standard `char*` array by all code, but can additionally have
* `g_ref_string_*()` methods called on it. `g_ref_string_*()` methods cannot be
* called on `char*` arrays not allocated using g_ref_string_new().
*
* If using #GRefString with autocleanups, g_autoptr() must be used rather than
* g_autofree(), so that the reference counting metadata is also freed.
*
* Since: 2.58
*/
typedef char GRefString; typedef char GRefString;
G_END_DECLS G_END_DECLS