GNOME Bugzilla – Bug 642298
Binding error in Gtk.Requisition.
Last modified: 2011-07-20 11:15:13 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.
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.
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.