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 652706 - protected virtual methods can't be annotated
protected virtual methods can't be annotated
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
: 730480 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-06-16 09:43 UTC by Xavier Claessens
Modified: 2017-02-10 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Xavier Claessens 2011-06-16 09:43:51 UTC
If I have a virtual method (declared in my class struct) but with no public function having the same name, then the virtual-method can't be annotated.

I've added a test case in regress.h:

http://cgit.collabora.com/git/user/xclaesse/gobject-introspection.git/commit/?h=virtual&id=d27efd9831c2d65e0f84a9f26976e102372de1e7

The .gir generated has introspectable="0" on the vmethod and the transfer full annotation is not applied.


My use-case is to make a subclass in python and override that method.
Comment 1 Xavier Claessens 2011-06-16 10:13:28 UTC
Note that changing return type to int make it introspectable, so that's really just the (transfer full) annotation missing but I don't know where/how to put it...
Comment 2 johnp 2011-06-17 16:13:39 UTC
reassigning to glib introspection as this is not specific to pygobject.  It may be reassigned back once the gir gets fixed and if there are issues with pygobject itself.
Comment 3 Xavier Claessens 2011-08-02 13:37:44 UTC
Note that I also tried with typedef the method signature like a callback:

http://cgit.collabora.com/git/user/xclaesse/gobject-introspection.git/commit/?h=testcase2&id=8d5be9fb7e15f7d9959bdcdd03c4114b732a7edf

But then g-i think that's a field and not a virtual-method:
      <field name="dup_object">
        <type name="TestObjDupObject" c:type="RegressTestObjDupObject"/>
      </field>

Would that work still?
Comment 4 Simon Feltman 2014-05-12 03:51:34 UTC
The links to cgit.collabora.com no longer work. Can you attach patches or examples here instead?

This also might be related to bug 725501.
Comment 5 Xavier Claessens 2014-05-12 13:44:59 UTC
Indeed I delete the repository, I forgot I had code linked. Pushed it again:

http://cgit.collabora.com/git/user/xclaesse/gobject-introspection.git/log/?h=virtual

http://cgit.collabora.com/git/user/xclaesse/gobject-introspection.git/commit/?h=testcase2

I didn't work on that recently, so I wouldn't be surprised if it's already fixed...
Comment 6 Simon Feltman 2014-05-21 01:30:42 UTC
*** Bug 730480 has been marked as a duplicate of this bug. ***
Comment 7 André Klapper 2015-02-07 17:17:29 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 8 Emmanuele Bassi (:ebassi) 2017-02-10 14:35:44 UTC
Virtual functions can be annotated since commit 9b4185f8.