GNOME Bugzilla – Bug 616376
Add annotation to (ignore) return value
Last modified: 2015-02-07 16:59: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 }
*** This bug has been marked as a duplicate of bug 599698 ***
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]