mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-16 04:28:05 +02:00
gdataset: Correct (nullable) and (transfer none) annotations
https://bugzilla.gnome.org/show_bug.cgi?id=756470
This commit is contained in:
parent
595a7e3bb2
commit
2a0e1c8422
@ -590,7 +590,7 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
|
|||||||
* @key_id: the #GQuark to identify the data element.
|
* @key_id: the #GQuark to identify the data element.
|
||||||
* @data: (nullable): the data element or %NULL to remove any previous element
|
* @data: (nullable): the data element or %NULL to remove any previous element
|
||||||
* corresponding to @key_id.
|
* corresponding to @key_id.
|
||||||
* @destroy_func: the function to call when the data element is
|
* @destroy_func: (nullable): the function to call when the data element is
|
||||||
* removed. This function will be called with the data
|
* removed. This function will be called with the data
|
||||||
* element and can be used to free any memory allocated
|
* element and can be used to free any memory allocated
|
||||||
* for it. If @data is %NULL, then @destroy_func must
|
* for it. If @data is %NULL, then @destroy_func must
|
||||||
@ -607,8 +607,8 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
|
|||||||
* @k: the string to identify the data element.
|
* @k: the string to identify the data element.
|
||||||
* @d: (nullable): the data element, or %NULL to remove any previous element
|
* @d: (nullable): the data element, or %NULL to remove any previous element
|
||||||
* corresponding to @k.
|
* corresponding to @k.
|
||||||
* @f: the function to call when the data element is removed. This
|
* @f: (nullable): the function to call when the data element is removed.
|
||||||
* function will be called with the data element and can be used to
|
* This function will be called with the data element and can be used to
|
||||||
* free any memory allocated for it. If @d is %NULL, then @f must
|
* free any memory allocated for it. If @d is %NULL, then @f must
|
||||||
* also be %NULL.
|
* also be %NULL.
|
||||||
*
|
*
|
||||||
@ -678,7 +678,8 @@ g_datalist_id_set_data_full (GData **datalist,
|
|||||||
* Removes an element, without calling its destroy notification
|
* Removes an element, without calling its destroy notification
|
||||||
* function.
|
* function.
|
||||||
*
|
*
|
||||||
* Returns: the data previously stored at @key_id, or %NULL if none.
|
* Returns: (nullable): the data previously stored at @key_id,
|
||||||
|
* or %NULL if none.
|
||||||
**/
|
**/
|
||||||
/**
|
/**
|
||||||
* g_dataset_remove_no_notify:
|
* g_dataset_remove_no_notify:
|
||||||
@ -717,7 +718,8 @@ g_dataset_id_remove_no_notify (gconstpointer dataset_location,
|
|||||||
* Removes an element, without calling its destroy notification
|
* Removes an element, without calling its destroy notification
|
||||||
* function.
|
* function.
|
||||||
*
|
*
|
||||||
* Returns: the data previously stored at @key_id, or %NULL if none.
|
* Returns: (nullable): the data previously stored at @key_id,
|
||||||
|
* or %NULL if none.
|
||||||
**/
|
**/
|
||||||
/**
|
/**
|
||||||
* g_datalist_remove_no_notify:
|
* g_datalist_remove_no_notify:
|
||||||
@ -747,8 +749,8 @@ g_datalist_id_remove_no_notify (GData **datalist,
|
|||||||
*
|
*
|
||||||
* Gets the data element corresponding to a #GQuark.
|
* Gets the data element corresponding to a #GQuark.
|
||||||
*
|
*
|
||||||
* Returns: the data element corresponding to the #GQuark, or %NULL if
|
* Returns: (transfer none) (nullable): the data element corresponding to
|
||||||
* it is not found.
|
* the #GQuark, or %NULL if it is not found.
|
||||||
**/
|
**/
|
||||||
/**
|
/**
|
||||||
* g_dataset_get_data:
|
* g_dataset_get_data:
|
||||||
@ -757,8 +759,8 @@ g_datalist_id_remove_no_notify (GData **datalist,
|
|||||||
*
|
*
|
||||||
* Gets the data element corresponding to a string.
|
* Gets the data element corresponding to a string.
|
||||||
*
|
*
|
||||||
* Returns: the data element corresponding to the string, or %NULL if
|
* Returns: (transfer none) (nullable): the data element corresponding to
|
||||||
* it is not found.
|
* the string, or %NULL if it is not found.
|
||||||
**/
|
**/
|
||||||
gpointer
|
gpointer
|
||||||
g_dataset_id_get_data (gconstpointer dataset_location,
|
g_dataset_id_get_data (gconstpointer dataset_location,
|
||||||
@ -789,7 +791,8 @@ g_dataset_id_get_data (gconstpointer dataset_location,
|
|||||||
*
|
*
|
||||||
* Retrieves the data element corresponding to @key_id.
|
* Retrieves the data element corresponding to @key_id.
|
||||||
*
|
*
|
||||||
* Returns: the data element, or %NULL if it is not found.
|
* Returns: (transfer none) (nullable): the data element, or %NULL if
|
||||||
|
* it is not found.
|
||||||
*/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_datalist_id_get_data (GData **datalist,
|
g_datalist_id_get_data (GData **datalist,
|
||||||
@ -832,7 +835,7 @@ g_datalist_id_get_data (GData **datalist,
|
|||||||
* This function can be useful to avoid races when multiple
|
* This function can be useful to avoid races when multiple
|
||||||
* threads are using the same datalist and the same key.
|
* threads are using the same datalist and the same key.
|
||||||
*
|
*
|
||||||
* Returns: the result of calling @dup_func on the value
|
* Returns: (nullable): the result of calling @dup_func on the value
|
||||||
* associated with @key_id in @datalist, or %NULL if not set.
|
* associated with @key_id in @datalist, or %NULL if not set.
|
||||||
* If @dup_func is %NULL, the value is returned unmodified.
|
* If @dup_func is %NULL, the value is returned unmodified.
|
||||||
*
|
*
|
||||||
@ -1006,7 +1009,8 @@ g_datalist_id_replace_data (GData **datalist,
|
|||||||
* Gets a data element, using its string identifier. This is slower than
|
* Gets a data element, using its string identifier. This is slower than
|
||||||
* g_datalist_id_get_data() because it compares strings.
|
* g_datalist_id_get_data() because it compares strings.
|
||||||
*
|
*
|
||||||
* Returns: the data element, or %NULL if it is not found.
|
* Returns: (transfer none) (nullable): the data element, or %NULL if it
|
||||||
|
* is not found.
|
||||||
**/
|
**/
|
||||||
gpointer
|
gpointer
|
||||||
g_datalist_get_data (GData **datalist,
|
g_datalist_get_data (GData **datalist,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user