From 2e4761056085b5a85c48a5dc1eaeed6bfdfdb5f5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 24 Sep 2023 23:25:32 -0400 Subject: [PATCH] docs: Drop the GString SECTION Move the contents to the GString struct docs. Helps: #3037 --- glib/gstring.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/glib/gstring.c b/glib/gstring.c index 9f0414429..79a8d2248 100644 --- a/glib/gstring.c +++ b/glib/gstring.c @@ -42,25 +42,6 @@ #include "gutilsprivate.h" -/** - * SECTION:strings - * @title: Strings - * @short_description: text buffers which grow automatically - * as text is added - * - * A #GString is an object that handles the memory management of a C - * string for you. The emphasis of #GString is on text, typically - * UTF-8. Crucially, the "str" member of a #GString is guaranteed to - * have a trailing nul character, and it is therefore always safe to - * call functions such as strchr() or g_strdup() on it. - * - * However, a #GString can also hold arbitrary binary data, because it - * has a "len" member, which includes any possible embedded nul - * characters in the data. Conceptually then, #GString is like a - * #GByteArray with the addition of many convenience methods for text, - * and a guaranteed nul terminator. - */ - /** * GString: * @str: points to the character data. It may move as text is added. @@ -71,7 +52,16 @@ * @allocated_len: the number of bytes that can be stored in the * string before it needs to be reallocated. May be larger than @len. * - * The GString struct contains the public fields of a GString. + * A `GString` is an object that handles the memory management of a C string. + * + * The emphasis of `GString` is on text, typically UTF-8. Crucially, the "str" member + * of a `GString` is guaranteed to have a trailing nul character, and it is therefore + * always safe to call functions such as `strchr()` or `strdup()` on it. + * + * However, a `GString` can also hold arbitrary binary data, because it has a "len" member, + * which includes any possible embedded nul characters in the data. Conceptually then, + * `GString` is like a `GByteArray` with the addition of many convenience methods for + * text, and a guaranteed nul terminator. */ static void