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 543344 - [gstreamer-0.10] gst_registry_feature_filter binding is wrong
[gstreamer-0.10] gst_registry_feature_filter binding is wrong
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.3.x
Other All
: Normal normal
: ---
Assigned To: Jared Moore
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-16 21:58 UTC by Thijs Vermeir
Modified: 2008-07-18 09:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example program (248 bytes, text/plain)
2008-07-17 20:36 UTC, Thijs Vermeir
  Details
correct patch? (1.63 KB, patch)
2008-07-18 09:05 UTC, Jared Moore
committed Details | Review

Description Thijs Vermeir 2008-07-16 21:58:38 UTC
The c declaration of this function is:
GList* gst_registry_feature_filter (GstRegistry *registry, GstPluginFeatureFilter filter, gboolean first, gpointer user_data);

The vala vapi is:
public weak GLib.List feature_filter (Gst.PluginFeatureFilter filter, bool first);

and if you use the function like this:
var registry = Registry.get_default ();
weak List list = registry.feature_filter (sink_caps_filter, false);

The generated C code is:
gst_registry_feature_filter (registry, _gst_colorspace2_sink_caps_filter_gst_plugin_feature_filter, self, FALSE);

Why is 'self' inserted before the boolean and not after?
Comment 1 Jürg Billeter 2008-07-17 16:16:18 UTC
2008-07-17  Jürg Billeter  <j@bitron.ch>

	* vapi/packages/gstreamer-0.10/:

	Fix various binding issues, based on patches by Thijs Vermeir and
	Jared Moore, fixes bug 543348, bug 543417, and bug 543344

	* vapi/gstreamer-0.10.vapi: regenerated

Fixed in r1711.
Comment 2 Thijs Vermeir 2008-07-17 20:31:11 UTC
This commit is not fixing this, it is creating the same code.
Comment 3 Thijs Vermeir 2008-07-17 20:36:54 UTC
Created attachment 114731 [details]
example program

Here is a small example program that demonstrates it.
$ valac registry.vala --pkg gstreamer-0.10
registry.c: In function ‘_main’:
registry.c:29: warning: passing argument 3 of ‘gst_registry_feature_filter’ makes integer from pointer without a cast
Comment 4 Jared Moore 2008-07-18 09:05:22 UTC
Created attachment 114755 [details] [review]
correct patch?

I think this is what the intended fix was. :)
Comment 5 Jürg Billeter 2008-07-18 09:12:07 UTC
Sure, sorry about that.
Comment 6 Jared Moore 2008-07-18 09:31:06 UTC
2008-07-18  Jared Moore  <jaredm@svn.gnome.org>

	* vapi/packages/gstreamer-0.10/:

	Fixed gst_registry_feature_filter binding, fixes bug 543344.

	* vapi/gstreamer-0.10.vapi: regenerated


Fixed in r1712.