After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647944 - Annotated type is not considered in GIR
Annotated type is not considered in GIR
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 647723
 
 
Reported: 2011-04-16 14:38 UTC by Sebastian Pölsterl
Modified: 2015-02-07 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Pölsterl 2011-04-16 14:38:05 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?
Comment 1 Simon Feltman 2013-12-09 01:28:28 UTC
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
Comment 2 André Klapper 2015-02-07 17:01:23 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]