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 616376 - Add annotation to (ignore) return value
Add annotation to (ignore) return value
Status: RESOLVED DUPLICATE of bug 599698
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-04-21 08:44 UTC by Danielle Madeley
Modified: 2015-02-07 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Danielle Madeley 2010-04-21 08:44:25 UTC
Lots of C API returns a gboolean on success or failure along with an associated GError.

You might have an API like this:
  gboolean badger_async_finish (Badger *self, GAsyncResult *res, GStrv *return1, GStrv *return2, GError **error)

The gboolean is useful for the C API, but in a JS API you need to catch the exception in order to know @error is, so the gboolean is redundant information.

It would be nice to be able to annotate this

  Returns: (ignore): %TRUE on success, %FALSE otherwise (@error will be set)

Which resulted in a binded API similar to:

try {
  let [return1, return2] = b.async_finish(res);
} catch (e) {
  ... stuff
}
Comment 1 Dan Winship 2010-04-21 13:38:12 UTC

*** This bug has been marked as a duplicate of bug 599698 ***
Comment 2 André Klapper 2015-02-07 16:59:25 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]