From: Matthias Clasen Date: Sun, 2 Oct 2011 03:27:45 +0000 (-0400) Subject: Move GString docs inline X-Git-Tag: 2.31.0~312 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e8bcc3ed7121c672af6ce52d8985a4d60f8545b;p=platform%2Fupstream%2Fglib.git Move GString docs inline --- 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/docs/reference/glib/tmpl/strings.sgml b/docs/reference/glib/tmpl/strings.sgml deleted file mode 100644 index 3c0b1bc..0000000 --- a/docs/reference/glib/tmpl/strings.sgml +++ /dev/null @@ -1,369 +0,0 @@ - -Strings - - -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. - - - - - - - - - - - - - - - -The #GString struct contains the public fields of a #GString. - - -@str: points to the character data. It may move as text is added. - The str field is nul-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. - - - - - - -@init: -@Returns: - - - - - - - -@init: -@len: -@Returns: - - - - - - - -@dfl_size: -@Returns: - - - - - - - -@string: -@rval: -@Returns: - - - - - - - - - - - - - - - - - - - - - -@string: -@format: -@args: - - - - - - - -@string: -@format: -@args: - - - - - - - -@string: -@format: -@Varargs: - - - - - - - -@string: -@format: -@Varargs: - - - - - - - -@string: -@val: -@Returns: - - - - - - - -@string: -@c: -@Returns: - - - - - - - -@string: -@wc: -@Returns: - - - - - - - -@string: -@val: -@len: -@Returns: - - - - - - - -@string: -@unescaped: -@reserved_chars_allowed: -@allow_utf8: -@Returns: - - - - - - - -@string: -@val: -@Returns: - - - - - - - -@string: -@c: -@Returns: - - - - - - - -@string: -@wc: -@Returns: - - - - - - - -@string: -@val: -@len: -@Returns: - - - - - - - -@string: -@pos: -@val: -@Returns: - - - - - - - -@string: -@pos: -@c: -@Returns: - - - - - - - -@string: -@pos: -@wc: -@Returns: - - - - - - - -@string: -@pos: -@val: -@len: -@Returns: - - - - - - - -@string: -@pos: -@val: -@Returns: - - - - - - - -@string: -@pos: -@val: -@len: -@Returns: - - - - - - - -@string: -@pos: -@len: -@Returns: - - - - - - - -@string: -@len: -@Returns: - - - - - - - -@string: -@len: -@Returns: - - - - - - - -@string: -@free_segment: -@Returns: - - - - - - -@string: -@Returns: - - - - - - -@string: -@Returns: - - - - - - - -@str: -@Returns: - - - - - - - -@v: -@v2: -@Returns: - - 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;