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 706525 - Rygel stores unowned Structure in var
Rygel stores unowned Structure in var
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: rygel-maint
rygel-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-21 18:39 UTC by Maciej (Matthew) Piechotka
Modified: 2013-08-26 09:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix error due to storing unowned value in variable (1.77 KB, patch)
2013-08-21 18:39 UTC, Maciej (Matthew) Piechotka
committed Details | Review

Description Maciej (Matthew) Piechotka 2013-08-21 18:39:30 UTC
Rygel stores unowned Structure in var which fails to compile, at least on valac 0.22:

rygel-playbin-player.vala:411.25-411.46: error: duplicating Structure
instance, use unowned variable or explicitly invoke copy method
        var structure = caps.get_structure (0);
                        ^^^^^^^^^^^^^^^^^^^^^
(...)
rygel-media-export-item-factory.vala:276.25-276.60: error: duplicating Structure instance, use unowned variable or explicitly invoke copy method
        var structure = sample.get_caps ().get_structure (0);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Comment 1 Maciej (Matthew) Piechotka 2013-08-21 18:39:32 UTC
Created attachment 252641 [details] [review]
Fix error due to storing unowned value in variable
Comment 2 Jens Georg 2013-08-21 21:55:13 UTC
Hm, I fixed the media-engine half of it in https://git.gnome.org/browse/rygel/commit/?id=0984169789698d5c038a5ce1230e2ea2328eb9fc

and my valac didn't complain about the other part...
Comment 3 Jens Georg 2013-08-26 09:23:06 UTC
committed the missing part, thanks