From ecbf8b6315dda927f4f90d8651033eb67c46a187 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 30 Apr 2007 17:50:43 +0000 Subject: fix GSlice thread init warning svn path=/trunk/; revision=660 --- ChangeLog | 6 ++++++ tests/common.py | 2 +- tests/testhelpermodule.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3792ef4..a371484 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-04-30 Gustavo J. A. M. Carneiro + * tests/common.py (importModules): Import testhelper first so that + g_thread_init is called before init_pygobject. + + * tests/testhelpermodule.c (inittesthelper): Call g_thread_init + before init_pygobject. + * tests/test_subtype.py (TestSubType.testDescriptor): Unit test for the bug below. diff --git a/tests/common.py b/tests/common.py index 25136b2..d0ff439 100644 --- a/tests/common.py +++ b/tests/common.py @@ -15,8 +15,8 @@ def importModules(buildDir, srcDir): sys.path.insert(0, os.path.join(buildDir, 'tests')) sys.argv.append('--g-fatal-warnings') - gobject = importModule('gobject', buildDir, 'gobject') testhelper = importModule('testhelper', '.') + gobject = importModule('gobject', buildDir, 'gobject') ltihooks.uninstall() del ltihooks diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c index 95542a3..d35aecc 100644 --- a/tests/testhelpermodule.c +++ b/tests/testhelpermodule.c @@ -484,8 +484,8 @@ inittesthelper () PyObject *m, *d; PyObject *module; - init_pygobject(); g_thread_init(NULL); + init_pygobject(); m = Py_InitModule ("testhelper", testhelper_functions); d = PyModule_GetDict(m); -- cgit