GNOME Bugzilla – Bug 622328
[girepository] Fix Constant info get type output introspection value
Last modified: 2018-01-25 15:42:53 UTC
arg is inout - as you have to provide it with a value (it does not initialize the arg for you)
Created attachment 164258 [details] [review] Fix Constant info get type output value
Review of attachment 164258 [details] [review]: ::: girepository/giconstantinfo.c @@ +68,3 @@ * @info: a #GIConstantInfo * g_constant_info_get_value: + * @value: (inout): an argument No it's actually (out caller-allocates) And this should be detected by recent versions of the scanner.
should be.. but is not ;) - this was generated from HEAD today. note the caller-allocates="0" <function name="constant_info_get_value" c:identifier="g_constant_info_get_value" introspectable="0"> <doc xml:whitespace="preserve">Obtain the value associated with the #GIConstantInfo and store it in the The size of the constant value stored in @argument will be returned.</doc> <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">size of the constant</doc> <type name="gint" c:type="gint"/> </return-value> <parameters> <parameter name="info" transfer-ownership="none"> <doc xml:whitespace="preserve">a #GIConstantInfo</doc> <type name="ConstantInfo" c:type="GIConstantInfo*"/> </parameter> <parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full"> <doc xml:whitespace="preserve">an argument</doc> <type c:type="GIArgument*"/> </parameter> </parameters> </function>
The patches in bug 581525 correct this as they fix up GIArgument problems: <function name="constant_info_get_value" c:identifier="g_constant_info_get_value" introspectable="0"> <return-value transfer-ownership="none"> <doc xml:space="preserve">size of the constant</doc> <type name="gint" c:type="gint"/> </return-value> <parameters> <parameter name="info" transfer-ownership="none"> <type name="ConstantInfo" c:type="GIConstantInfo*"/> </parameter> <parameter name="value" direction="out" caller-allocates="1" transfer-ownership="none"> <type name="Argument" c:type="GIArgument*"/> </parameter>
Verified caller-allocates="1" with git master due to fixes for bug 581525 being committed. However, the function is still explicitly skipped. I'm not sure what the intention of this bug is but if we want to make the function introspectable, those explicit skips should be removed, otherwise we can close this.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
The API is being skipped since 2010; this bug can be closed — and a new one to remove the (skip) annotation should be opened.