mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
introspection: use (nullable) or (optional) instead of (allow-none)
If we have an input parameter (or return value) we need to use (nullable). However, if it is an (inout) or (out) parameter, (optional) is sufficient. It looks like (nullable) could be used for everything according to the Annotation documentation, but (optional) is more specific.
This commit is contained in:
@@ -269,7 +269,7 @@ g_action_get_name (GAction *action)
|
||||
* In the case that this function returns %NULL, you must not give any
|
||||
* #GVariant, but %NULL instead.
|
||||
*
|
||||
* Returns: (allow-none): the parameter type
|
||||
* Returns: (nullable): the parameter type
|
||||
*
|
||||
* Since: 2.28
|
||||
**/
|
||||
@@ -299,7 +299,7 @@ g_action_get_parameter_type (GAction *action)
|
||||
* then this function will return %NULL. In that case, g_action_get_state()
|
||||
* will return %NULL and you must not call g_action_change_state().
|
||||
*
|
||||
* Returns: (allow-none): the state type, if the action is stateful
|
||||
* Returns: (nullable): the state type, if the action is stateful
|
||||
*
|
||||
* Since: 2.28
|
||||
**/
|
||||
@@ -373,7 +373,7 @@ g_action_get_enabled (GAction *action)
|
||||
/**
|
||||
* g_action_activate:
|
||||
* @action: a #GAction
|
||||
* @parameter: (allow-none): the parameter to the activation
|
||||
* @parameter: (nullable): the parameter to the activation
|
||||
*
|
||||
* Activates the action.
|
||||
*
|
||||
@@ -542,7 +542,7 @@ bad_fmt:
|
||||
/**
|
||||
* g_action_print_detailed_name:
|
||||
* @action_name: a valid action name
|
||||
* @target_value: (allow-none): a #GVariant target value, or %NULL
|
||||
* @target_value: (nullable): a #GVariant target value, or %NULL
|
||||
*
|
||||
* Formats a detailed action name from @action_name and @target_value.
|
||||
*
|
||||
|
Reference in New Issue
Block a user