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 674206 - Add helper macro to implement _finish() methods
Add helper macro to implement _finish() methods
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: gio
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-04-16 15:06 UTC by Xavier Claessens
Modified: 2012-10-10 22:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Xavier Claessens 2012-04-16 15:06:17 UTC
telepathy-glib has _tp_implement_finish_void() and friends to implement _finish() functions in one line. I think they should be moved to gio's public API.

http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/tree/telepathy-glib/util-internal.h#n52

If people agree on the idea, I could prepare a patch.
Comment 1 Xavier Claessens 2012-04-16 15:07:50 UTC
Actually link on the official repository instead of mine:
http://cgit.freedesktop.org/telepathy/telepathy-glib/tree/telepathy-glib/util-internal.h#n52
Comment 2 Dan Winship 2012-04-16 15:35:43 UTC
GTask in bug 661767 (which I'm hoping to land soon, after glib branches) makes finish functions a lot simpler, so this would be less necessary. Eg, you'd have:

  GList *
  tp_list_connection_managers_finish (GAsyncResult *result,
                                      GError **error)
  {
    g_return_val_if_fail (g_task_is_valid (result, NULL), NULL);

    return g_task_propagate_pointer (G_TASK (result), error);
  }

where g_task_propagate_pointer() either steals the return value from @result (making it unnecessary to do an extra copy), or else fills in @error with an error and returns NULL.
Comment 3 Xavier Claessens 2012-10-10 22:41:38 UTC
Ok makes sense. Closing.