No way to specify annotations for virtual methods
Submitted by Stef Walter
Link to original bug (#725501)
Description
Virtual methods such as the GcrCertificate get_der_data() cannot be correctly annotated, and do not take their annotations from the accompanying accessor function either.
The function in question is here:
https://git.gnome.org/browse/gcr/tree/gcr/gcr-certificate.h#n48
The accessor is here:
https://git.gnome.org/browse/gcr/tree/gcr/gcr-certificate.c#n395
This is the <virtual-method>
that's generated, with an wrong <return-value>
`<virtual-method name="get_der_data">`
`<return-value transfer-ownership="none">`
<type name="guint8" c:type="const guint8*"/>
`</return-value>`
`<parameters>`
`<instance-parameter name="self" transfer-ownership="none">`
<type name="Certificate" c:type="GcrCertificate*"/>
`</instance-parameter>`
`<parameter name="n_data" transfer-ownership="none">`
<type name="gsize" c:type="gsize*"/>
`</parameter>`
`</parameters>`
`</virtual-method>`
This is the <method>
that's generated, with a wrong <return-value>
:
<method name="get_der_data" c:identifier="gcr_certificate_get_der_data">
<doc xml:space="preserve">Gets the raw DER data for an X.509 certificate.`</doc>`
`<return-value transfer-ownership="none">`
<doc xml:space="preserve">raw DER data of the X.509 certificate`</doc>`
<array length="0" zero-terminated="0" c:type="guint8*">
<type name="guint8" c:type="guint8"/>
`</array>`
`</return-value>`
`<parameters>`
`<instance-parameter name="self" transfer-ownership="none">`
<doc xml:space="preserve">a #GcrCertificate`</doc>`
<type name="Certificate" c:type="GcrCertificate*"/>
`</instance-parameter>`
<parameter name="n_data"
direction="out"
caller-allocates="0"
transfer-ownership="full">
<doc xml:space="preserve">a pointer to a location to store the size of the resulting DER data.`</doc>`
<type name="gsize" c:type="gsize*"/>
`</parameter>`
`</parameters>`
`</method>`