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 704931 - GMenuModel virtual functions don't have out annotation
GMenuModel virtual functions don't have out annotation
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.37.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-07-26 13:46 UTC by Ted Gould
Modified: 2013-07-29 21:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test GIR file (1.14 KB, application/octet-stream)
2013-07-26 13:46 UTC, Ted Gould
  Details
Generated VAPI file (388 bytes, text/x-vala)
2013-07-26 13:46 UTC, Ted Gould
  Details
Patch to add docs for the functions (806 bytes, patch)
2013-07-29 19:22 UTC, Ted Gould
none Details | Review

Description Ted Gould 2013-07-26 13:46:21 UTC
Created attachment 250201 [details]
Test GIR file

When parsing a GIR file that has a double pointer vapigen should see that as an out parameter.  It doesn't, and so then generates the code incorrectly when trying to use that function.

Attached is a small GIR file to show the problem that is executed like:

$ vapigen --girdir=. --library=test-1.0 Test-1.0.gir

Doing that generates a VAPI with the function protoype:

public virtual void test_this (GLib.HashTable<void*,void*> hashtable);

instead of:

public virtual void test_this (out GLib.HashTable<void*,void*> hashtable);

This can seen in the GIO vapi file with MenuModel.get_item_links().
Comment 1 Ted Gould 2013-07-26 13:46:46 UTC
Created attachment 250202 [details]
Generated VAPI file
Comment 2 Ted Gould 2013-07-29 19:21:22 UTC
Moved over to glib because it seems to be related to missing comments on the virtual functions to designate them as 'out'
Comment 3 Ted Gould 2013-07-29 19:22:56 UTC
Created attachment 250395 [details] [review]
Patch to add docs for the functions
Comment 4 Allison Karlitskaya (desrt) 2013-07-29 21:16:22 UTC
Thanks for the patch.  Applied.