GNOME Bugzilla – Bug 523075
[PATCH] broken prepare() for Python-impemented Source objects
Last modified: 2008-04-08 14:28:07 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.
Created attachment 107497 [details] [review] bcs_source_prepare.patch
Created attachment 107498 [details] [review] bcs_test_prepare.patch
Sending ChangeLog Sending gobject/pygsource.c Sending tests/test_source.py Transmitting file data ... Committed revision 766.