GNOME Bugzilla – Bug 656031
Improve GVariant annotations
Last modified: 2015-02-07 17:01:28 UTC
Several GVariant annotations have problems: g_variant_new_bytestring, g_variant_get_bytestring and g_variant_dup_bytestring need explicit element-type annotations, otherwise gi-scanner incorrectly infers utf8 element type. (transfer none) annotation is missing on g_variant_get_data and g_variant_get_fixed_array g_variant_type_string_scan is missing (out) annotation
Created attachment 193312 [details] [review] Patch which adds missing annotations
Review of attachment 193312 [details] [review]: ::: glib/gvariant.c @@ +1591,3 @@ /** * g_variant_new_bytestring: + * @string: (array zero-terminated=1) (element-type gchar): a normal This should be guint8; I'd treat bytestrings as explicitly unsigned. @@ +1616,3 @@ * g_variant_get_bytestring: * @value: an array-of-bytes #GVariant instance + * @returns: (transfer none) (array zero-terminated=1) (element-type gchar): Ditto. @@ +1660,3 @@ * @length: (out) (allow-none) (default NULL): a pointer to a #gsize, to store * the length (not including the nul terminator) + * @returns: (transfer full) (array zero-terminated=1 length=length) (element-type gchar): a newly allocated string Ditto.
Created attachment 193339 [details] [review] Add missing annotations Thanks for review, new patch with gchar->guint8 change is here
Review of attachment 193339 [details] [review]: Looks good.
Review of attachment 193339 [details] [review]: Committed
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]