[glib: 1/5] grefstring: Add missing documentation for GRefString typedef
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/5] grefstring: Add missing documentation for GRefString typedef
- Date: Tue, 18 Dec 2018 15:35:24 +0000 (UTC)
commit 68ea997effc2de17cf942c6593e20a77a5b05091
Author: Philip Withnall <withnall endlessm com>
Date: Wed Nov 28 12:14:20 2018 +0000
grefstring: Add missing documentation for GRefString typedef
Signed-off-by: Philip Withnall <withnall endlessm com>
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]