genums: Add missing (transfer) and (nullable) return annotations

This commit only looks at the `Returns:` lines in the documentation, and
has examined all of them in the file. Function arguments have not been
checked.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2227
This commit is contained in:
Philip Withnall 2020-12-11 23:48:35 +00:00
parent 819409cf9a
commit a9e3e3715a

View File

@ -392,7 +392,7 @@ g_flags_class_init (GFlagsClass *class,
*
* Looks up a #GEnumValue by name.
*
* Returns: (transfer none): the #GEnumValue with name @name,
* Returns: (transfer none) (nullable): the #GEnumValue with name @name,
* or %NULL if the enumeration doesn't have a member
* with that name
*/
@ -422,7 +422,7 @@ g_enum_get_value_by_name (GEnumClass *enum_class,
*
* Looks up a #GFlagsValue by name.
*
* Returns: (transfer none): the #GFlagsValue with name @name,
* Returns: (transfer none) (nullable): the #GFlagsValue with name @name,
* or %NULL if there is no flag with that name
*/
GFlagsValue*
@ -451,7 +451,7 @@ g_flags_get_value_by_name (GFlagsClass *flags_class,
*
* Looks up a #GEnumValue by nickname.
*
* Returns: (transfer none): the #GEnumValue with nickname @nick,
* Returns: (transfer none) (nullable): the #GEnumValue with nickname @nick,
* or %NULL if the enumeration doesn't have a member
* with that nickname
*/
@ -481,7 +481,7 @@ g_enum_get_value_by_nick (GEnumClass *enum_class,
*
* Looks up a #GFlagsValue by nickname.
*
* Returns: (transfer none): the #GFlagsValue with nickname @nick,
* Returns: (transfer none) (nullable): the #GFlagsValue with nickname @nick,
* or %NULL if there is no flag with that nickname
*/
GFlagsValue*
@ -510,7 +510,7 @@ g_flags_get_value_by_nick (GFlagsClass *flags_class,
*
* Returns the #GEnumValue for a value.
*
* Returns: (transfer none): the #GEnumValue for @value, or %NULL
* Returns: (transfer none) (nullable): the #GEnumValue for @value, or %NULL
* if @value is not a member of the enumeration
*/
GEnumValue*
@ -538,7 +538,7 @@ g_enum_get_value (GEnumClass *enum_class,
*
* Returns the first #GFlagsValue which is set in @value.
*
* Returns: (transfer none): the first #GFlagsValue which is set in
* Returns: (transfer none) (nullable): the first #GFlagsValue which is set in
* @value, or %NULL if none is set
*/
GFlagsValue*