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 642298 - Binding error in Gtk.Requisition.
Binding error in Gtk.Requisition.
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
0.11.x
Other Linux
: Normal blocker
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks: 641100
 
 
Reported: 2011-02-14 15:33 UTC by Patricia Santana Cruz
Modified: 2011-07-20 11:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Patricia Santana Cruz 2011-02-14 15:33:48 UTC
Bindings used:
gtk+-3.0.vapi

Code used in the .vala file:
Gtk.Requisition minimum_req = Gtk.Requisition();

Related and generated code in the .c file that causes the error: 
gtk_requisition_new (&minimum_req)

The API describes gtk_requisition_new() with void arguments. Moreover, when building, the following error is prompted for the above example case:  "error: too many arguments to function ‘gtk_requisition_new’".

It seems to be a problem in the bindings. Asking in the #vala channel, abustany and Lethalman agreed and suggested that Gtk.Requisition should be a Compact class rather than a struct.
Comment 1 Luca Bruno 2011-05-24 17:23:08 UTC
This GtkRequisition acts as struct in method calls, while it's a compact class with regards to its methods. Maybe it's better to keep it as struct to not break code, it's only about hiding gtk_requisition_new.
Comment 2 Luca Bruno 2011-07-20 11:15:13 UTC
commit 3ba36b0715568185434c178d7b416f23b6c784fe
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Wed Jul 20 13:11:56 2011 +0200

    gtk+-3.0: Hide the creation method of Requisition
    
    The method gtk_requisition_new is provided to help bindings of high-level
    languages, but it isn't needed for vala.
    
    Fixes bug 642298.

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.