mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 14:06:15 +01:00
Annotate GVariant and GSettings _strv() functions
Add GObject introspection annotations so that the length parameter is correctly detected for g_variant_new_strv(), g_variant_get_strv() and g_variant_dup_strv(). Also specify that it can be a NULL pointer in g_variant_get_strv() and g_variant_dup_strv(). For g_settings_set_strv(), detect that a NULL value is allowed, meaning empty array. Closes bug #620384. Signed-off-by: Ryan Lortie <desrt@desrt.ca>
This commit is contained in:
parent
0e691f27ec
commit
3682666140
@ -1833,7 +1833,7 @@ g_settings_get_strv (GSettings *settings,
|
||||
* g_settings_set_strv:
|
||||
* @settings: a #GSettings object
|
||||
* @key: the name of the key to set
|
||||
* @value: the value to set it to, or %NULL
|
||||
* @value: (allow-none): the value to set it to, or %NULL
|
||||
* @returns: %TRUE if setting the key succeeded,
|
||||
* %FALSE if the key was not writable
|
||||
*
|
||||
|
@ -1244,7 +1244,7 @@ g_variant_get_byte_array (GVariant *value,
|
||||
* g_variant_new_strv:
|
||||
* @strv: an array of strings
|
||||
* @length: the length of @strv, or -1
|
||||
* @returns: a new floating #GVariant instance
|
||||
* @returns: (array length=length): a new floating #GVariant instance
|
||||
*
|
||||
* Constructs an array of strings #GVariant from the given array of
|
||||
* strings.
|
||||
@ -1277,8 +1277,8 @@ g_variant_new_strv (const gchar * const *strv,
|
||||
/**
|
||||
* g_variant_get_strv:
|
||||
* @value: an array of strings #GVariant
|
||||
* @length: the length of the result, or %NULL
|
||||
* @returns: an array of constant strings
|
||||
* @length: (allow-none): the length of the result, or %NULL
|
||||
* @returns: (array length=length): an array of constant strings
|
||||
*
|
||||
* Gets the contents of an array of strings #GVariant. This call
|
||||
* makes a shallow copy; the return result should be released with
|
||||
@ -1329,8 +1329,8 @@ g_variant_get_strv (GVariant *value,
|
||||
/**
|
||||
* g_variant_dup_strv:
|
||||
* @value: an array of strings #GVariant
|
||||
* @length: the length of the result, or %NULL
|
||||
* @returns: an array of constant strings
|
||||
* @length: (allow-none): the length of the result, or %NULL
|
||||
* @returns: (array length=length): an array of constant strings
|
||||
*
|
||||
* Gets the contents of an array of strings #GVariant. This call
|
||||
* makes a deep copy; the return result should be released with
|
||||
|
Loading…
Reference in New Issue
Block a user