From 68ea997effc2de17cf942c6593e20a77a5b05091 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 28 Nov 2018 12:14:20 +0000 Subject: [PATCH] grefstring: Add missing documentation for GRefString typedef Signed-off-by: Philip Withnall --- glib/grefstring.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/glib/grefstring.h b/glib/grefstring.h index 65b391ffa..c27767c71 100644 --- a/glib/grefstring.h +++ b/glib/grefstring.h @@ -39,6 +39,19 @@ void g_ref_string_release (char *str); GLIB_AVAILABLE_IN_2_58 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; G_END_DECLS