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 523075 - [PATCH] broken prepare() for Python-impemented Source objects
[PATCH] broken prepare() for Python-impemented Source objects
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gobject
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-17 23:52 UTC by Bryan Silverthorn
Modified: 2008-04-08 14:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bcs_source_prepare.patch (444 bytes, patch)
2008-03-17 23:57 UTC, Bryan Silverthorn
none Details | Review
bcs_test_prepare.patch (954 bytes, patch)
2008-03-17 23:58 UTC, Bryan Silverthorn
none Details | Review

Description Bryan Silverthorn 2008-03-17 23:52:58 UTC
The pyg_source_prepare() function in pygsource.c, which wraps the GSourceFuncs prepare() method for all Source objects implemented in Python, fails to set the timeout argument in any case where that argument is meaningful (ie, when prepare() returns non-True). This means that Python-implemented Source objects cannot request timeouts, and that it is therefore not possible to implement a nontrivial event source in Python.

A patch to fix this issue is attached. A patch adding a corresponding unit test is also attached. Both patches are against r751.
Comment 1 Bryan Silverthorn 2008-03-17 23:57:55 UTC
Created attachment 107497 [details] [review]
bcs_source_prepare.patch
Comment 2 Bryan Silverthorn 2008-03-17 23:58:45 UTC
Created attachment 107498 [details] [review]
bcs_test_prepare.patch
Comment 3 Johan (not receiving bugmail) Dahlin 2008-04-08 14:28:07 UTC
Sending        ChangeLog
Sending        gobject/pygsource.c
Sending        tests/test_source.py
Transmitting file data ...
Committed revision 766.