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 591979 - gst_object_replace doesn't generate the correct c code.
gst_object_replace doesn't generate the correct c code.
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-16 16:03 UTC by Víctor Manuel Jáquez Leal
Modified: 2009-09-15 16:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Turns Gst.Object.replace into a static function (2.12 KB, text/plain)
2009-08-16 16:14 UTC, Víctor Manuel Jáquez Leal
Details

Description Víctor Manuel Jáquez Leal 2009-08-16 16:03:11 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
Comment 1 Víctor Manuel Jáquez Leal 2009-08-16 16:11:14 UTC
grrr... I can't attach the patch (bug 591955)!!
Comment 2 Víctor Manuel Jáquez Leal 2009-08-16 16:14:11 UTC
Created attachment 140893 [details]
Turns Gst.Object.replace into a static function
Comment 3 Jürg Billeter 2009-09-15 16:55:41 UTC
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?
Comment 4 Jürg Billeter 2009-09-15 16:56:33 UTC
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.