Needs to use ref syntax with GtkListStore (Vala 0.36)

Bug #1686083 reported by David King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Committed
High
Unassigned
3.24
Fix Released
Medium
Unassigned

Bug Description

I was packaging 3.25.1 for Fedora and came across a build failure:

valac '-d' 'src/simple-scan@exe' '-C' '--target-glib' ' 2.38' '--pkg' 'glib-2.0' '--pkg' 'gtk+-3.0' '--pkg' 'zlib' '--pkg' 'cairo' '--pkg' 'gdk-pixbuf-2.0' '--pkg' 'gusb' '--pkg' 'sane-backends' '--pkg' 'colord' '--pkg' 'packagekit-glib2' '--gresources=../src/simple-scan.gresource.xml' '--pkg=posix' '--vapidir=/builddir/build/BUILD/simple-scan-3.25.1/src' '-D' 'HAVE_COLORD' '-D' 'HAVE_PACKAGEKIT' ../src/config.vapi ../src/book.vala ../src/book-view.vala ../src/page.vala ../src/page-view.vala ../src/simple-scan.vala ../src/scanner.vala ../src/ui.vala ../src/autosave-manager.vala
../src/ui.vala:470.42-470.45: error: Argument 1: Cannot pass value to reference or output parameter
                    device_model.remove (iter);
                                         ^^^^
../src/ui.vala:483.34-483.37: error: Argument 1: Cannot pass value to reference or output parameter
            device_model.remove (iter);
                                 ^^^^
Compilation failed: 2 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.

It seems that Vala now (there is 0.36.1 in Fedora) expects those to be ref arguments.

Revision history for this message
David King (amigadave) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

It looks like the Vala bindings fixed this problem, though now I'm trying to work out how to get this to compile with both the old and new bindings...

Changed in simple-scan:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Robert Ancell (robert-ancell) wrote :

From the Vala NEWS file:

 * Updated bindings. Some fixes may need to be wrapped in your Vala code
   with the preparser directive #if VALA_0_36

Changed in simple-scan:
status: Triaged → Fix Committed
milestone: none → 3.25.2
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Thanks David!

summary: - Needs to use ref syntax with GtkListStore
+ Needs to use ref syntax with GtkListStore (Vala 0.36)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.