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 657725 - Improve introspection support for GMainLoop&co
Improve introspection support for GMainLoop&co
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-08-30 15:22 UTC by Pavel Holejsovsky
Modified: 2015-02-07 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Makes GMainLoop&co boxed types, adds a few missing annotations to them (8.86 KB, patch)
2011-08-30 15:23 UTC, Pavel Holejsovsky
committed Details | Review
Diff of resulting GLib.gir file, illustrating impact of the patch (31.04 KB, patch)
2011-08-30 15:24 UTC, Pavel Holejsovsky
none Details | Review

Description Pavel Holejsovsky 2011-08-30 15:22:22 UTC
GMainLoop, GMainContext and GSource introspection is currently very low quality, because these structs are not boxed.
Comment 1 Pavel Holejsovsky 2011-08-30 15:23:51 UTC
Created attachment 195218 [details] [review]
Makes GMainLoop&co boxed types, adds a few missing annotations to them
Comment 2 Pavel Holejsovsky 2011-08-30 15:24:40 UTC
Created attachment 195219 [details] [review]
Diff of resulting GLib.gir file, illustrating impact of the patch
Comment 3 Colin Walters 2011-08-30 20:55:46 UTC
Review of attachment 195218 [details] [review]:

Thanks, Pavel.  There is definitely an old bug where we debated adding this, but since we've added boxed types for GDateTime and others, I think this just makes sense now.  Previously we had basically said that this stuff from GLib should be manually bound, but the problem with that is the GLib API keeps evolving (like bug 655129), and it's just a pain point to keep up.

::: glib/gmain.h
@@ +141,3 @@
  * @status: Status information about the child process,
  *     see waitpid(2) for more information about this field
+ * @data: (closure): user data passed to g_child_watch_add()

Nowadays I generally prefer renaming the parameter rather than adding (closure).  Just call it user_data.
Comment 4 Pavel Holejsovsky 2011-08-31 07:39:17 UTC
Review of attachment 195218 [details] [review]:

Committed with data->user_data rename instead of using (closure), as suggested.  Thanks for the quick review Colin!
Comment 5 André Klapper 2015-02-07 17:01:33 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]