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 648957 - GIR Writer: vfuncs don't include instance parameter
GIR Writer: vfuncs don't include instance parameter
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: GObject Introspection
0.12.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-29 17:18 UTC by Eitan Isaacson
Modified: 2011-05-23 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eitan Isaacson 2011-04-29 17:18:50 UTC
When defining an abstract method such as:
public abstract void some_method ();

It is interpreted as a vfunc, which is great, but in the gir output the instance parameter is missing, we get:

 <field name="some_method">
  <callback name="keyboard_some_method" c:type="keyboard_some_method">
   <return-value transfer-ownership="none">
    <type name="none"/>
   </return-value>
  </callback>
 </field>

Where we should get:
 <field name="some_method">
  <callback c:type="keyboard_some_method" name="keyboard_some_method">
   <parameters> 
    <parameter name="self" transfer-ownership="none">
     <type c:type="CaribouKeyboard" name="Keyboard"/>
    </parameter>
   </parameters>
   <return-value transfer-ownership="none">
    <type name="none"/>
   </return-value>
  </callback>
 </field>

This makes it hard to override the method properly in pygi since we can't pass the instance variable to the method.
Comment 1 Luca Bruno 2011-05-23 16:52:39 UTC
commit ec7f7b1f15f08c49d70200a1b9226be6e0231abf
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Mon May 23 18:43:49 2011 +0200

    girwriter: Add self parameter to the callback of virtual methods field
    
    Fixes bug 650607.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.