vapigen: Gst.ChildProxy.get_property() `value` parameter is not listed as a parameter, so I can't make it `ref` like I need to
This is part of #1014 (closed). The generated gstreamer-1.0.vapi says, in part:
namespace Gst {
...
[CCode (cheader_filename = "gst/gst.h", type_cname = "GstChildProxyInterface", type_id = "gst_child_proxy_get_type ()")]
public interface ChildProxy : GLib.Object {
...
public GLib.Value get_property (string name);
The output is currently listed as a return value, but I need it to be a ref
parameter. How do I do this?
Specifically, corresponding gst_child_proxy_get_property
takes three arguments, the last of which is a GValue *
:
/**
* gst_child_proxy_get_property:
* @object: object to query
* @name: name of the property
* @value: (out caller-allocates): a #GValue that should take the result.
*
* Gets a single property using the GstChildProxy mechanism.
* You are responsible for freeing it by calling g_value_unset()
*/
void
gst_child_proxy_get_property (GstChildProxy * object, const gchar * name,
GValue * value)
The implementation of that function uses g_object_get_property()
, which requires that its value
argument be initialized. Therefore, I want to list this function as void get_property(string name, ref GLib.Value value)
. However, I cannot find where in vapigen the parameter is being moved to a return value, so I don't know how to fix it.
The corresponding gir on my system is:
<interface name="ChildProxy"
c:symbol-prefix="child_proxy"
c:type="GstChildProxy"
glib:type-name="GstChildProxy"
glib:get-type="gst_child_proxy_get_type"
glib:type-struct="ChildProxyInterface">
...
<method name="get_property" c:identifier="gst_child_proxy_get_property">
...
<source-position filename="gstchildproxy.h" line="86"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="object" transfer-ownership="none">
<doc xml:space="preserve"
filename="gstchildproxy.c"
line="259">object to query</doc>
<type name="ChildProxy" c:type="GstChildProxy*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve"
filename="gstchildproxy.c"
line="260">name of the property</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="value"
direction="out"
caller-allocates="1"
transfer-ownership="none">
<doc xml:space="preserve"
filename="gstchildproxy.c"
line="261">a #GValue that should take the result.</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
Thanks for your help!