From 293fdc312c0eabd8407e2f60e1135fb08bfcfe03 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 1 Feb 2014 00:27:22 -0500 Subject: [PATCH] GVariantType: convert docs to markdown Convert lists to markdown syntax, and remove lots of . --- glib/gvarianttype.c | 190 +++++++++++++++++++++------------------------------- 1 file changed, 76 insertions(+), 114 deletions(-) diff --git a/glib/gvarianttype.c b/glib/gvarianttype.c index 772daae..20c628a 100644 --- a/glib/gvarianttype.c +++ b/glib/gvarianttype.c @@ -45,7 +45,7 @@ * introduction of maybe (or "nullable") types. Any type in GVariant can be * converted to a maybe type, in which case, "nothing" (or "null") becomes a * valid value. Maybe types have been added by introducing the - * character "m" to type strings. + * character "m" to type strings. * * The second major change is that the GVariant type system supports the * concept of "indefinite types" -- types that are less specific than @@ -53,8 +53,7 @@ * of "an array of any type" in GVariant, where the D-Bus type system * would require you to speak of "an array of integers" or "an array of * strings". Indefinite types have been added by introducing the - * characters "*", "?" and - * "r" to type strings. + * characters "*", "?" and "r" to type strings. * * Finally, all arbitrary restrictions relating to the complexity of * types are lifted along with the restriction that dictionary entries @@ -92,67 +91,36 @@ * that the #GtkWindow is a #GtkBin (since #GtkWindow is a subclass of * #GtkBin). * + * * A detailed description of GVariant type strings is given here: + * * - * - * GVariant Type Strings - * - * A GVariant type string can be any of the following: - * - * - * - * - * any basic type string (listed below) - * - * - * - * - * "v", "r" or - * "*" - * - * - * - * - * one of the characters 'a' or - * 'm', followed by another type string - * - * - * - * - * the character '(', followed by a concatenation - * of zero or more other type strings, followed by the character - * ')' - * - * - * - * - * the character '{', followed by a basic type - * string (see below), followed by another type string, followed by - * the character '}' - * - * - * - * - * A basic type string describes a basic type (as per - * g_variant_type_is_basic()) and is always a single - * character in length. The valid basic type strings are - * "b", "y", - * "n", "q", - * "i", "u", - * "x", "t", - * "h", "d", - * "s", "o", - * "g" and "?". - * - * - * The above definition is recursive to arbitrary depth. - * "aaaaai" and "(ui(nq((y)))s)" - * are both valid type strings, as is - * "a(aa(ui)(qna{ya(yd)}))". - * - * - * The meaning of each of the characters is as follows: - * + * ## GVariant Type Strings + * + * A GVariant type string can be any of the following: + * + * - any basic type string (listed below) + * + * - "v", "r" or "*" + * + * - one of the characters 'a' or 'm', followed by another type string + * + * - the character '(', followed by a concatenation of zero or more other + * type strings, followed by the character ')' + * + * - the character '{', followed by a basic type string (see below), + * followed by another type string, followed by the character '}' + * + * A basic type string describes a basic type (as per + * g_variant_type_is_basic()) and is always a single character in length. + * The valid basic type strings are "b", "y", "n", "q", "i", "u", "x", "t", + * "h", "d", "s", "o", "g" and "?". + * + * The above definition is recursive to arbitrary depth. "aaaaai" and + * "(ui(nq((y)))s)" are both valid type strings, as is + * "a(aa(ui)(qna{ya(yd)}))". + * + * The meaning of each of the characters is as follows: * * * @@ -171,7 +139,7 @@ * * * - * b + * b * * * @@ -183,7 +151,7 @@ * * * - * y + * y * * * @@ -195,7 +163,7 @@ * * * - * n + * n * * * @@ -208,7 +176,7 @@ * * * - * q + * q * * * @@ -221,7 +189,7 @@ * * * - * i + * i * * * @@ -234,7 +202,7 @@ * * * - * u + * u * * * @@ -247,7 +215,7 @@ * * * - * x + * x * * * @@ -260,7 +228,7 @@ * * * - * t + * t * * * @@ -273,7 +241,7 @@ * * * - * h + * h * * * @@ -287,7 +255,7 @@ * * * - * d + * d * * * @@ -300,7 +268,7 @@ * * * - * s + * s * * * @@ -312,7 +280,7 @@ * * * - * o + * o * * * @@ -325,7 +293,7 @@ * * * - * g + * g * * * @@ -338,7 +306,7 @@ * * * - * ? + * ? * * * @@ -351,7 +319,7 @@ * * * - * v + * v * * * @@ -364,51 +332,50 @@ * * * - * a + * a * * * * * used as a prefix on another type string to mean an array of - * that type; the type string "ai", for - * example, is the type of an array of 32 bit signed integers. + * that type; the type string "ai", for example, is the type of + * an array of signed 32-bit integers. * * * * * * - * m + * m * * * * * used as a prefix on another type string to mean a "maybe", or - * "nullable", version of that type; the type string - * "ms", for example, is the type of a value - * that maybe contains a string, or maybe contains nothing. + * "nullable", version of that type; the type string "ms", for example, + * is the type of a value that maybe contains a string, or maybe + * contains nothing. * * * * * * - * () + * () * * * * * used to enclose zero or more other concatenated type strings - * to create a tuple type; the type string - * "(is)", for example, is the type of a pair - * of an integer and a string. + * to create a tuple type; the type string "(is)", for example, + * is the type of a pair of an integer and a string. * * * * * * - * r + * r * * * @@ -422,7 +389,7 @@ * * * - * {} + * {} * * * @@ -430,13 +397,12 @@ * used to enclose a basic type string concatenated with another * type string to create a dictionary entry type, which usually * appears inside of an array to form a dictionary; the type - * string "a{sd}", for example, is the type of - * a dictionary that maps strings to double precision floating - * point values. + * string "a{sd}", for example, is the type of a dictionary that + * maps strings to double precision floating point values. * * * The first type (the basic type) is the key type and the second - * type is the value type. The reason that the first type is + * type is the value type. The reason that the first type is * restricted to being a basic type is so that it can easily be * hashed. * @@ -445,14 +411,14 @@ * * * - * * + * * * * * * * the type string of %G_VARIANT_TYPE_ANY; the indefinite type * that is a supertype of all types. Note that, as with all type - * strings, this character represents exactly one type. It + * strings, this character represents exactly one type. It * cannot be used inside of tuples to mean "any number of items". * * @@ -460,24 +426,20 @@ * * * - * - * Any type string of a container that contains an indefinite type is, - * itself, an indefinite type. For example, the type string - * "a*" (corresponding to %G_VARIANT_TYPE_ARRAY) is - * an indefinite type that is a supertype of every array type. - * "(*s)" is a supertype of all tuples that - * contain exactly two items where the second item is a string. - * - * - * "a{?*}" is an indefinite type that is a - * supertype of all arrays containing dictionary entries where the key - * is any basic type and the value is any type at all. This is, by - * definition, a dictionary, so this type string corresponds to - * %G_VARIANT_TYPE_DICTIONARY. Note that, due to the restriction that - * the key of a dictionary entry must be a basic type, - * "{**}" is not a valid type string. - * - * + * + * Any type string of a container that contains an indefinite type is, + * itself, an indefinite type. For example, the type string "a*" + * (corresponding to %G_VARIANT_TYPE_ARRAY) is an indefinite type + * that is a supertype of every array type. "(*s)" is a supertype + * of all tuples that contain exactly two items where the second + * item is a string. + * + * "a{?*}" is an indefinite type that is a supertype of all arrays + * containing dictionary entries where the key is any basic type and + * the value is any type at all. This is, by definition, a dictionary, + * so this type string corresponds to %G_VARIANT_TYPE_DICTIONARY. Note + * that, due to the restriction that the key of a dictionary entry must + * be a basic type, "{**}" is not a valid type string. */ -- 2.7.4