GNOME Bugzilla – Bug 766386
GrlSource resolution functions don't delare taking ownership of media param
Last modified: 2016-06-27 12:21:37 UTC
Created attachment 327810 [details] A test program showing the error The grl_source_resolve() and grl_source_resolve_sync() functions don't declare taking the ownership of the reference to media parameter from the caller even though they do, which ends up breaking the Vala code generation (the generated VAPI lacks the "owned" keyword in front of the media parameter) and ake them unusable in Vala. I attached an example program showing the problem, without the patch I have this result: refs: 1 refs: 2863311530 Erreur de segmentation (core dumped)
Created attachment 327811 [details] [review] grl-source: Make resolution funcs own 'media' param Declare the ownership of the 'media' param of grl_source_resolve() and grl_source_resolve_sync() as fully transfered. This is needed to avoid reference counting bugs in the Vala bindings.
Here is the result with the patch: refs: 1 refs: 1 (and after that everything prints as expected)
Review of attachment 327811 [details] [review]: Looks good.
Could you please integrate the test program into a test case that would be compiled and run when Vala support is enabled? Looks good to commit when we have a regression test for it.
Attachment 327811 [details] pushed as 6d46eb2 - grl-source: Make resolution funcs own 'media' param