GNOME Bugzilla – Bug 730168
Incorrect annotation on g_action_group_get_action_state_type return value
Last modified: 2015-06-05 17:02:29 UTC
/** * ... * Returns: (transfer full): the state type, if the action is stateful * ... **/ const GVariantType * g_action_group_get_action_state_type (GActionGroup *action_group, const gchar *action_name) However, looking at the implementation of query_action in GDBusActionGroup: if (state_type) *state_type = info->state ? g_variant_get_type (info->state) : NULL; if (state_hint) *state_hint = NULL; if (state) *state = info->state ? g_variant_ref (info->state) : NULL; And g_variant_get_type is pretty clear about the return value not transferring ownership.
Created attachment 277139 [details] [review] GActionGroup: fix an annotation .get_action_state_type() does not return a copy. We remove the annotation entirely because it is evident from the 'const' on the return type.
Review of attachment 277139 [details] [review]: yes
Attachment 277139 [details] pushed as eeae795 - GActionGroup: fix an annotation