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 664302 - Make GPollable streams available to bindings
Make GPollable streams available to bindings
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-11-17 21:35 UTC by Giovanni Campagna
Modified: 2011-11-18 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GPollable*Stream: expose source methods to introspection (1.72 KB, patch)
2011-11-17 21:36 UTC, Giovanni Campagna
committed Details | Review
GMain: allow NULL context to g_source_attach (1011 bytes, patch)
2011-11-17 21:36 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2011-11-17 21:35:47 UTC
The most useful feature of GPollable*Stream (that is, creating GSources for polling) is currently blocked because of (skip), that are not really needed.

Patch following.
(Also, a small patch to make g_source_attach useful in pure introspection bindings like gjs, where GMainContext is not available)
Comment 1 Giovanni Campagna 2011-11-17 21:36:22 UTC
Created attachment 201622 [details] [review]
GPollable*Stream: expose source methods to introspection

GSource is perfectly introspectable, so there is no need to
skip all methods of GPollableInputStream/OutputStream that deal with it.
Comment 2 Giovanni Campagna 2011-11-17 21:36:32 UTC
Created attachment 201623 [details] [review]
GMain: allow NULL context to g_source_attach

Documentation says it's fine and means default context, but the annotations
are missing (and thus bindings would complain).
Comment 3 Colin Walters 2011-11-17 22:08:08 UTC
Review of attachment 201622 [details] [review]:

But what changed here?  Was it after we added the boxed types for GSource?  

If that's the case then, looks fine to me; the commit message would be better as "GSource is now introspectable, so stop skipping methods that return one."

One more note - we're relying on the implicit (transfer full) for boxeds, but I'd like to start adding them now.
Comment 4 Colin Walters 2011-11-17 22:08:21 UTC
Review of attachment 201623 [details] [review]:

Looks fine.
Comment 5 Giovanni Campagna 2011-11-18 14:22:33 UTC
Attachment 201622 [details] pushed as 71d3dad - GPollable*Stream: expose source methods to introspection
Attachment 201623 [details] pushed as d2fd6da - GMain: allow NULL context to g_source_attach