GNOME Bugzilla – Bug 779251
build: Boxes won't build against Valac --version > 0.35.5
Last modified: 2017-03-27 09:25:48 UTC
GNOME 3.24, and consequently Boxes 3.24, will be shipped with valac 0.36. In doing so, Boxes needs to build with it. Nowadays, building against Vala 0.35.5.19-361fc (HEAD master today), I obtain the following build failure error: icon-view.vala:221.23-221.26: error: Argument 1: Cannot pass value to reference or output parameter store.remove (iter); ^^^^
Created attachment 346751 [details] [review] icon-view: GtkListStore.remove() requires ref arg Since commit https://git.gnome.org/browse/vala/commit/?id=ddca99e the vapi for gtk+-X.0 marks the "iter" param of GtkListore.remove as 'ref'. This way, we now increase the internal reference counting of the Gtk.TreeIter while passing it to store.remove (). This patch breaks the building with valac <= 0.35.5
Created attachment 346752 [details] [review] icon-view: GtkListStore.remove() requires ref arg Since commit https://git.gnome.org/browse/vala/commit/?id=ddca99e the vapi for gtk+-X.0 marks the "iter" param of GtkListore.remove as 'ref'. This way, we now increase the internal reference counting of the Gtk.TreeIter while passing it to store.remove (). This patch adds an (undesired) #if VALA_0_36 conditional check in order to keep Boxes building against older versions of Vala.
Created attachment 346753 [details] [review] icon-view: GtkListStore.remove() requires 'ref' arg Since commit https://git.gnome.org/browse/vala/commit/?id=ddca99e the vapi for gtk+-X.0 marks the "iter" param of GtkListore.remove as 'ref'. This way, we now increase the internal reference counting of the Gtk.TreeIter while passing it to store.remove (). This patch breaks the building with valac <= 0.35.5
I propose two solutions. The first patch is backwards compatible in a ugly way. btw, I though git-bz wouldn't overwrite the patches since their commit messages differ. Apparently just the first line is compared, heh. :p
*** Bug 779267 has been marked as a duplicate of this bug. ***
Comment on attachment 346752 [details] [review] icon-view: GtkListStore.remove() requires ref arg Looks good.
Thank you Rico for your prompt response and your amazing work with Vala. Attachment 346752 [details] pushed as 8173193 - icon-view: GtkListStore.remove() requires ref arg
Feel free to drop the #if VALA_0_36 check now that you've branched 3.24. Thanks!