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 783392 - incorrect (out) annotation for g_dbus_interface_info_generate_xml
incorrect (out) annotation for g_dbus_interface_info_generate_xml
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: introspection
2.53.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-06-03 22:41 UTC by Phil Clayton
Modified: 2017-06-05 15:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Phil Clayton 2017-06-03 22:41:52 UTC
The argument @string_builder of g_dbus_interface_info_generate_xml has an (out) annotation but I believe that it should be (in).  The comment says that @string_builder is a "#GString to to append XML data to".  The (out) annotation will cause certain language bindings to provide no means to pass a value in for @string_builder, so it would not be possible to append to an existing GString.

As for bug 770421, this has probably not been picked up as an annotation error because the single level of indirection in the parameter type would cause this to be interpreted as (out caller-allocates).
Comment 1 Philip Withnall 2017-06-05 15:09:08 UTC
commit 085b3470f0bc1c2972a63433caa4e098a378d2f6
Author: Philip Withnall <withnall@endlessm.com>
Date:   Mon Jun 5 16:07:52 2017 +0100

    gdbusintrospection: Remove incorrect (out) annotations
    
    The caller passes in a GString instance which is then modified by the
    function, rather than the function building its own GString and passing
    it out to the caller.
    
    Signed-off-by: Philip Withnall <withnall@endlessm.com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783392

 gio/gdbusintrospection.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)