GNOME Bugzilla – Bug 591979
gst_object_replace doesn't generate the correct c code.
Last modified: 2009-09-15 16:56:33 UTC
The function gst_object_replace [1] needs that the first parameter be reference to the object. Vala doesn't validate this ADDRESS_OF requirement, generating incorrect c code. One approach to fix is could be modify the code generator in order to manage this (very uncommon) situations (see bug 589795) Another approach is change the gst_object_replace method into a static function. A patch with this approach is provided. 1. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html#gst-object-replace
grrr... I can't attach the patch (bug 591955)!!
Created attachment 140893 [details] Turns Gst.Object.replace into a static function
The patch looks fine. However, I'm wondering why you even need that in Vala as a simple assignment does exactly the same or am I missing something?
commit 6d83ef9dcb589d32d831cbe37de52257b2963cc2 Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Sun Aug 16 17:49:15 2009 +0200 gstreamer-0.10: Turn gst_object_replace into a static function Fixes bug 591979.