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 677952 - Missing annotation for GDBusConnection signal "closed"
Missing annotation for GDBusConnection signal "closed"
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-06-12 15:14 UTC by Phil Clayton
Modified: 2015-02-07 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add annotation (1.02 KB, patch)
2012-06-12 15:18 UTC, Phil Clayton
accepted-commit_now Details | Review
Add missing annotation to GDBusConnection::closed (1.02 KB, patch)
2012-06-23 21:53 UTC, Matthias Clasen
committed Details | Review

Description Phil Clayton 2012-06-12 15:14:59 UTC
The parameter error can be NULL so should have the annotation (allow-none).
Comment 1 Phil Clayton 2012-06-12 15:18:13 UTC
Created attachment 216211 [details] [review]
patch to add annotation
Comment 2 Matthias Clasen 2012-06-15 22:56:05 UTC
I thought gobject-introspection was smart about this for GError parameters ?
We don't have such annotations anywhere else, and error parameters can generally
always be NULL...
Comment 3 Phil Clayton 2012-06-16 01:35:50 UTC
For an ordinary library function that can produce an error, I can see that gboject-introspection doesn't explicitly mention the error parameter: in GIR files, the function/method would have the attribute throws="1"; the GIRepository interface sets the flag GI_FUNCTION_THROWS in the return value of g_function_info_get_flags.  Such error parameters are always 'out' parameters (and are optional).

In the case of GDBusConnection::closed, the signal handler is not producing an error but may be passed an existing error, to provide error info.  This error parameter is an 'in' parameter.  Currently, the GIR file has

          <parameter name="error" transfer-ownership="none">
            <doc xml:whitespace="preserve">A #GError with more details about the event or %NULL.</doc>
            <type name="GLib.Error"/>
          </parameter>

I couldn't see any smart handing of this type of error 'in' parameter.  It looks like an ordinary parameter.  Have I missed something?
Comment 4 Matthias Clasen 2012-06-16 02:11:05 UTC
Ah, ok, that is a difference I hadn't considered.
Comment 5 Matthias Clasen 2012-06-16 02:11:22 UTC
Review of attachment 216211 [details] [review]:

I thought gobject-introspection was smart about this for GError parameters ?
Comment 6 Matthias Clasen 2012-06-23 21:53:30 UTC
The following fix has been pushed:
02eed18 Add missing annotation to GDBusConnection::closed
Comment 7 Matthias Clasen 2012-06-23 21:53:33 UTC
Created attachment 217099 [details] [review]
Add missing annotation to GDBusConnection::closed

Add annotation (allow-none) to the parameter error.
Comment 8 André Klapper 2015-02-07 16:49:13 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]