GNOME Bugzilla – Bug 647944
Annotated type is not considered in GIR
Last modified: 2015-02-07 17:01:23 UTC
g_variant_compare and g_variant_equal are both annotated with "(type GVariant"). However, this currently has no effect on the generated GIR file and is simply ignored. On line 299 of girwriter.py there's a comment mentioning that this part should be enabled. Is this still the case?
Verified this has been fixed by looking at the GIR and testing: <method name="compare" c:identifier="g_variant_compare" version="2.26"> <parameters> <instance-parameter name="one" transfer-ownership="none"> <doc xml:space="preserve">a basic-typed #GVariant instance</doc> <type name="Variant" c:type="gconstpointer"/> </instance-parameter> <parameter name="two" transfer-ownership="none"> <doc xml:space="preserve">a #GVariant instance of the same type</doc> <type name="Variant" c:type="gconstpointer"/> </parameter> </parameters> >>> from gi.repository import GLib >>> a = GLib.Variant('i', 1) >>> b = GLib.Variant('i', 1) >>> c = GLib.Variant('i', 2) >>> a.compare(b) 0 >>> a.compare(c) -1
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]