/* Container type Constructor / Deconstructors {{{1 */
/**
* g_variant_new_maybe:
- * @child_type: the #GVariantType of the child
- * @child: the child value, or %NULL
+ * @child_type: (allow-none): the #GVariantType of the child, or %NULL
+ * @child: (allow-none): the child value, or %NULL
* @returns: a new #GVariant maybe instance
*
- * Depending on if @value is %NULL, either wraps @value inside of a
+ * Depending on if @child is %NULL, either wraps @child inside of a
* maybe container or creates a Nothing instance for the given @type.
*
- * At least one of @type and @value must be non-%NULL. If @type is
- * non-%NULL then it must be a definite type. If they are both
- * non-%NULL then @type must be the type of @value.
+ * At least one of @child_type and @child must be non-%NULL.
+ * If @child_type is non-%NULL then it must be a definite type.
+ * If they are both non-%NULL then @child_type must be the type
+ * of @child.
*
* Since: 2.24
**/
/**
* g_variant_get_maybe:
* @value: a maybe-typed value
- * @returns: the contents of @value, or %NULL
+ * @returns: (allow-none): the contents of @value, or %NULL
*
* Given a maybe-typed #GVariant instance, extract its value. If the
* value is Nothing, then this function returns %NULL.
/**
* g_variant_new_array:
- * @child_type: the element type of the new array
- * @children: an array of #GVariant pointers, the children
+ * @child_type: (allow-none): the element type of the new array
+ * @children: (allow-none) (array length=n_children): an array of
+ * #GVariant pointers, the children
* @n_children: the length of @children
* @returns: a new #GVariant array
*
/*< private >
* g_variant_make_tuple_type:
- * @children: an array of GVariant *
+ * @children: (array length=n_children): an array of GVariant *
* @n_children: the length of @children
*
* Return the type of a tuple containing @children as its items.
/**
* g_variant_new_tuple:
- * @children: the items to make the tuple out of
+ * @children: (array length=n_children): the items to make the tuple out of
* @n_children: the length of @children
* @returns: a new #GVariant tuple
*
* @value: a #GVariant array with fixed-sized elements
* @n_elements: a pointer to the location to store the number of items
* @element_size: the size of each element
- * @returns: a pointer to the fixed array
+ * @returns: (array length=n_elements): a pointer to the fixed array
*
* Provides access to the serialised data for an array of fixed-sized
* items.
/**
* g_variant_get_string:
* @value: a string #GVariant instance
- * @length: a pointer to a #gsize, to store the length
+ * @length: (allow-none) (default NULL): a pointer to a #gsize,
+ * to store the length
* @returns: the constant string, utf8 encoded
*
* Returns the string value of a #GVariant instance with a string
/**
* g_variant_new_byte_array:
- * @array: a pointer to an array of bytes
+ * @array: (array length=length): a pointer to an array of bytes
* @length: the length of @array, or -1
* @returns: a new floating #GVariant instance
*
/**
* g_variant_get_byte_array:
* @value: an array of bytes #GVariant
- * @length: the length of the result, or %NULL
- * @returns: a pointer to the byte data, or %NULL
+ * @length: (allow-none): the length of the result, or %NULL
+ * @returns: (array length=length): a pointer to the byte data, or %NULL
*
* Gets the contents of an array of bytes #GVariant.
*
/**
* g_variant_print_string:
* @value: a #GVariant
- * @string: a #GString, or %NULL
+ * @string: (allow-none) (default NULL): a #GString, or %NULL
* @type_annotate: %TRUE if type information should be included in
* the output
* @returns: a #GString containing the string
/* Hash, Equal, Compare {{{1 */
/**
* g_variant_hash:
- * @value: a basic #GVariant value as a #gconstpointer
+ * @value: (type GVariant): a basic #GVariant value as a #gconstpointer
* @returns: a hash value corresponding to @value
*
* Generates a hash value for a #GVariant instance.
/**
* g_variant_equal:
- * @one: a #GVariant instance
- * @two: a #GVariant instance
+ * @one: (type GVariant): a #GVariant instance
+ * @two: (type GVariant): a #GVariant instance
* @returns: %TRUE if @one and @two are equal
*
* Checks if @one and @two have the same type and value.
/**
* g_variant_compare:
- * @one: a basic-typed #GVariant instance
- * @two: a #GVariant instance of the same type
+ * @one: (type GVariant): a basic-typed #GVariant instance
+ * @two: (type GVariant): a #GVariant instance of the same type
* @returns: negative value if a < b;
* zero if a = b;
* positive value if a > b.
/**
* g_variant_iter_next_value:
* @iter: a #GVariantIter
- * @returns: a #GVariant, or %NULL
+ * @returns: (allow-none): a #GVariant, or %NULL
*
* Gets the next item in the container. If no more items remain then
* %NULL is returned.
/*< private >
* g_variant_format_string_scan:
* @string: a string that may be prefixed with a format string
- * @limit: a pointer to the end of @string, or %NULL
- * @endptr: location to store the end pointer, or %NULL
+ * @limit: (allow-none) (default NULL): a pointer to the end of @string,
+ * or %NULL
+ * @endptr: (allow-none) (default NULL): location to store the end pointer,
+ * or %NULL
* @returns: %TRUE if there was a valid format string
*
* Checks the string pointed to by @string for starting with a properly
/*< private >
* g_variant_format_string_scan_type:
* @string: a string that may be prefixed with a format string
- * @limit: a pointer to the end of @string
- * @endptr: location to store the end pointer, or %NULL
- * @returns: a #GVariantType if there was a valid format string
+ * @limit: (allow-none) (default NULL): a pointer to the end of @string,
+ * or %NULL
+ * @endptr: (allow-none) (default NULL): location to store the end pointer,
+ * or %NULL
+ * @returns: (allow-none): a #GVariantType if there was a valid format string
*
* If @string starts with a valid format string then this function will
* return the type that the format string corresponds to. Otherwise
/**
* g_variant_new_va:
* @format_string: a string that is prefixed with a format string
- * @endptr: location to store the end pointer, or %NULL
+ * @endptr: (allow-none) (default NULL): location to store the end pointer,
+ * or %NULL
* @app: a pointer to a #va_list
* @returns: a new, usually floating, #GVariant
*
* g_variant_get_va:
* @value: a #GVariant
* @format_string: a string that is prefixed with a format string
- * @endptr: location to store the end pointer, or %NULL
+ * @endptr: (allow-none) (default NULL): location to store the end pointer,
+ * or %NULL
* @app: a pointer to a #va_list
*
* This function is intended to be used by libraries based on #GVariant