gvariant: Fix some typos in documentation

Reformatted the docs for G_VARIANT_TYPE_UINT64 to avoid having a
number in the beginning of the line, because apparently gtk-doc treats
that as a first element of the numbered list. The number being that
big probably makes gtk-doc to treat it as 1.

Fixed the g_variant_new_fixed_array documentation - it was partially
copy-pasted from the g_variant_get_fixed_array documentation.

The rest should be quite obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=781830
This commit is contained in:
Krzesimir Nowak 2017-04-26 11:58:58 +02:00 committed by Philip Withnall
parent f3321da462
commit 75cd848ea8
3 changed files with 10 additions and 11 deletions

View File

@ -58,10 +58,10 @@
* can use: * can use:
* *
* |[<!-- language="C" --> * |[<!-- language="C" -->
* GVariant *v = g_variant_new ('u', 40); * GVariant *v = g_variant_new ("u", 40);
* ]| * ]|
* *
* The string 'u' in the first argument tells #GVariant that the data passed to * The string "u" in the first argument tells #GVariant that the data passed to
* the constructor (40) is going to be an unsigned integer. * the constructor (40) is going to be an unsigned integer.
* *
* More advanced examples of #GVariant in use can be found in documentation for * More advanced examples of #GVariant in use can be found in documentation for
@ -1177,10 +1177,10 @@ g_variant_get_fixed_array (GVariant *value,
* @n_elements: the number of elements * @n_elements: the number of elements
* @element_size: the size of each element * @element_size: the size of each element
* *
* Provides access to the serialised data for an array of fixed-sized * Constructs a new array #GVariant instance, where the elements are
* items. * of @element_type type.
* *
* @value must be an array with fixed-sized elements. Numeric types are * @elements must be an array with fixed-sized elements. Numeric types are
* fixed-size as are tuples containing only other fixed-sized types. * fixed-size as are tuples containing only other fixed-sized types.
* *
* @element_size must be the size of a single element in the array. * @element_size must be the size of a single element in the array.
@ -1189,8 +1189,7 @@ g_variant_get_fixed_array (GVariant *value,
* of a double-check that the form of the serialised data matches the caller's * of a double-check that the form of the serialised data matches the caller's
* expectation. * expectation.
* *
* @n_elements, which must be non-%NULL is set equal to the number of * @n_elements must be the length of the @elements array.
* items in the array.
* *
* Returns: (transfer none): a floating reference to a new array #GVariant instance * Returns: (transfer none): a floating reference to a new array #GVariant instance
* *
@ -5336,7 +5335,7 @@ g_variant_new (const gchar *format_string,
* *
* Note that the arguments in @app must be of the correct width for their * Note that the arguments in @app must be of the correct width for their
* types specified in @format_string when collected into the #va_list. * types specified in @format_string when collected into the #va_list.
* See the [GVariant varargs documentation][gvariant-varargs. * See the [GVariant varargs documentation][gvariant-varargs].
* *
* These two generalisations allow mixing of multiple calls to * These two generalisations allow mixing of multiple calls to
* g_variant_new_va() and g_variant_get_va() within a single actual * g_variant_new_va() and g_variant_get_va() within a single actual

View File

@ -133,7 +133,7 @@
* - `s`: the type string of %G_VARIANT_TYPE_STRING; a string. * - `s`: the type string of %G_VARIANT_TYPE_STRING; a string.
* - `o`: the type string of %G_VARIANT_TYPE_OBJECT_PATH; a string in the form * - `o`: the type string of %G_VARIANT_TYPE_OBJECT_PATH; a string in the form
* of a D-Bus object path. * of a D-Bus object path.
* - `g`: the type string of %G_VARIANT_TYPE_STRING; a string in the form of * - `g`: the type string of %G_VARIANT_TYPE_SIGNATURE; a string in the form of
* a D-Bus type signature. * a D-Bus type signature.
* - `?`: the type string of %G_VARIANT_TYPE_BASIC; an indefinite type that * - `?`: the type string of %G_VARIANT_TYPE_BASIC; an indefinite type that
* is a supertype of any of the basic types. * is a supertype of any of the basic types.

View File

@ -96,8 +96,8 @@ typedef struct _GVariantType GVariantType;
/** /**
* G_VARIANT_TYPE_UINT64: * G_VARIANT_TYPE_UINT64:
* *
* The type of an integer value that can range from 0 to * The type of an integer value that can range from 0
* 18446744073709551616. That's a really big number, but a Rubik's * to 18446744073709551616. That's a really big number, but a Rubik's
* cube can have a bit more than twice as many possible positions. * cube can have a bit more than twice as many possible positions.
**/ **/
#define G_VARIANT_TYPE_UINT64 ((const GVariantType *) "t") #define G_VARIANT_TYPE_UINT64 ((const GVariantType *) "t")