From a1c2bc60bd137b0faecb75a22f8c96c952c4ada4 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Fri, 23 May 2008 16:54:58 +0000 Subject: Merge from trunk: 2008-05-23 Johan Dahlin Merge from trunk: * gobject/__init__.py: * tests/test_properties.py: Allow gobject.property work with subclasses. Add tests. (#523352, Tomeu Vizoso) * gobject/pygsource.c: * tests/test_source.py: Unbreak Source.prepare (#523075, Bryan Silverthorn) * gobject/gobjectmodule.c (REGISTER_TYPE): Never override customly set 'tp_new' and 'tp_alloc'. * configure.ac: Don't link against libffi if we cannot find libffi on the system. (#496006, Ed Catmur) * Makefile.am: Dist .m4 files. (#496011, Ed Catmur) * gobject/pygenum.c (pyg_enum_richcompare): Don't return NULL after warning; more useful warning message (bug #519631). svn path=/branches/pygobject-2-14/; revision=781 --- gobject/pygsource.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gobject/pygsource.c') diff --git a/gobject/pygsource.c b/gobject/pygsource.c index 900bd4f..9e831e5 100644 --- a/gobject/pygsource.c +++ b/gobject/pygsource.c @@ -418,14 +418,12 @@ pyg_source_prepare(GSource *source, gint *timeout) } ret = PyObject_IsTrue(PyTuple_GET_ITEM(t, 0)); - - if (ret) { *timeout = PyInt_AsLong(PyTuple_GET_ITEM(t, 1)); + if (*timeout == -1 && PyErr_Occurred()) { ret = FALSE; goto bail; } - } got_err = FALSE; -- cgit