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 622328 - [girepository] Fix Constant info get type output introspection value
[girepository] Fix Constant info get type output introspection value
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: libgirepository
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on: 581525
Blocks:
 
 
Reported: 2010-06-21 22:41 UTC by Alan Knowles
Modified: 2018-01-25 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix Constant info get type output value (988 bytes, patch)
2010-06-21 22:41 UTC, Alan Knowles
rejected Details | Review

Description Alan Knowles 2010-06-21 22:41:49 UTC
arg is inout - as you have to provide it with a value (it does not initialize the arg for you)
Comment 1 Alan Knowles 2010-06-21 22:41:52 UTC
Created attachment 164258 [details] [review]
Fix Constant info get type output value
Comment 2 Colin Walters 2010-06-24 15:05:39 UTC
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.
Comment 3 Alan Knowles 2010-09-06 23:59:07 UTC
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>
Comment 4 Simon Feltman 2013-12-29 23:30:05 UTC
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>
Comment 5 Simon Feltman 2014-01-04 22:57:28 UTC
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.
Comment 6 André Klapper 2015-02-07 17:18:06 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 7 Emmanuele Bassi (:ebassi) 2018-01-25 15:42:53 UTC
The API is being skipped since 2010; this bug can be closed — and a new one to remove the (skip) annotation should be opened.