[glib] Move GString docs inline
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Move GString docs inline
- Date: Sun, 2 Oct 2011 03:28:26 +0000 (UTC)
commit 0e8bcc3ed7121c672af6ce52d8985a4d60f8545b
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 1 23:27:45 2011 -0400
Move GString docs inline
docs/reference/glib/tmpl/.gitignore | 1 +
docs/reference/glib/tmpl/strings.sgml | 369 ---------------------------------
glib/gstring.c | 29 +++
glib/gstring.h | 12 -
4 files changed, 30 insertions(+), 381 deletions(-)
---
diff --git a/docs/reference/glib/tmpl/.gitignore b/docs/reference/glib/tmpl/.gitignore
index 0420458..cc11db4 100644
--- a/docs/reference/glib/tmpl/.gitignore
+++ b/docs/reference/glib/tmpl/.gitignore
@@ -41,6 +41,7 @@ relations.sgml
sequence.sgml
shell.sgml
spawn.sgml
+strings.sgml
string_chunks.sgml
string_utils.sgml
testing.sgml
diff --git a/glib/gstring.c b/glib/gstring.c
index 0594a6d..da5b3d6 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -391,6 +391,35 @@ g_string_chunk_insert_len (GStringChunk *chunk,
/* Strings.
*/
+
+/**
+ * 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. You can think of it as similar to a
+ * Java StringBuffer. In addition to the string itself, GString
+ * stores the length of the string, so can be used for binary
+ * data with embedded nul bytes. To access the C string managed
+ * by the GString @string, simply use @string->str.
+ */
+
+/**
+ * GString:
+ * @str: points to the character data. It may move as text is added.
+ * The @str field is null-terminated and so
+ * can be used as an ordinary C string.
+ * @len: contains the length of the string, not including the
+ * terminating nul byte.
+ * @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.
+ */
+
+
static void
g_string_maybe_expand (GString *string,
gsize len)
diff --git a/glib/gstring.h b/glib/gstring.h
index 9cd64de..68c494f 100644
--- a/glib/gstring.h
+++ b/glib/gstring.h
@@ -40,18 +40,6 @@ G_BEGIN_DECLS
typedef struct _GString GString;
typedef struct _GStringChunk GStringChunk;
-/**
- * GString:
- * @str: points to the character data. It may move as text is added.
- * The @str field is null-terminated and so
- * can be used as an ordinary C string.
- * @len: contains the length of the string, not including the
- * terminating nul byte.
- * @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.
- */
struct _GString
{
gchar *str;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]