summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--gobject/pygsource.c6
-rw-r--r--tests/test_source.py7
3 files changed, 17 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 32f0fcb..f19592b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ Bug 504337 - crash bug in gobject.Timeout and gobject.Idle
+
+ * gobject/pygsource.c:
+ * tests/test_source.py:
+ Fix crash in Timeout and Idle, patch by Bryan Silverthorn.
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
* codegen/argtypes.py:
Map GSeekType to an int
diff --git a/gobject/pygsource.c b/gobject/pygsource.c
index 9e831e5..53d0cae 100644
--- a/gobject/pygsource.c
+++ b/gobject/pygsource.c
@@ -651,8 +651,7 @@ PyTypeObject PyGIdle_Type = {
(getattrofunc)0, /* tp_getattro */
(setattrofunc)0, /* tp_setattro */
0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_HAVE_GC, /* tp_flags */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
NULL, /* tp_doc */
(traverseproc)0, /* tp_traverse */
(inquiry)0, /* tp_clear */
@@ -728,8 +727,7 @@ PyTypeObject PyGTimeout_Type = {
(getattrofunc)0, /* tp_getattro */
(setattrofunc)0, /* tp_setattro */
0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
- Py_TPFLAGS_HAVE_GC, /* tp_flags */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
NULL, /* tp_doc */
(traverseproc)0, /* tp_traverse */
(inquiry)0, /* tp_clear */
diff --git a/tests/test_source.py b/tests/test_source.py
index fd5f310..8e7e81c 100644
--- a/tests/test_source.py
+++ b/tests/test_source.py
@@ -90,5 +90,12 @@ class TestSource(unittest.TestCase):
assert dispatched[0]
+
+class TestTimeout(unittest.TestCase):
+ def test504337(self):
+ timeout_source = gobject.Timeout(20)
+ idle_source = gobject.Idle()
+
+
if __name__ == '__main__':
unittest.main()