diff options
| author | Johan Dahlin <johan@src.gnome.org> | 2004-09-28 15:03:43 +0000 |
|---|---|---|
| committer | Johan Dahlin <johan@src.gnome.org> | 2004-09-28 15:03:43 +0000 |
| commit | 44d583628cb7ec1b08d5d7c38bca11479b192424 (patch) | |
| tree | 339a42392c32ea16ddf79dd583e1657ba998f662 /tests | |
| parent | 66ebbb785442fd411a251ac262763a47252cf272 (diff) | |
| download | pygobject-44d583628cb7ec1b08d5d7c38bca11479b192424.tar.gz pygobject-44d583628cb7ec1b08d5d7c38bca11479b192424.tar.xz pygobject-44d583628cb7ec1b08d5d7c38bca11479b192424.zip | |
Apply slighly modified fix from bug 149845PYGTK_2_3_97
This is make threading usable for both users of the threading
module and users that requires interaction with threads from
other extension modules.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_thread.py | 4 | ||||
| -rw-r--r-- | tests/testhelpermodule.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_thread.py b/tests/test_thread.py index a40b99f..d58a30f 100644 --- a/tests/test_thread.py +++ b/tests/test_thread.py @@ -1,7 +1,11 @@ +import os import unittest from common import gobject, gtk, testhelper +# Enable PyGILState API +os.environ['PYGTK_USE_GIL_STATE_API'] = '' + gobject.threads_init() class TestThread(unittest.TestCase): diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c index 6c787d9..7eb7867 100644 --- a/tests/testhelpermodule.c +++ b/tests/testhelpermodule.c @@ -110,7 +110,7 @@ static void test_thread_class_init (TestThreadClass *klass) g_signal_new ("from-thread", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (TestThreadClass, from_thread), NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, - test_thread_enum_get_type()); + test_thread_enum_get_type ()); klass->emit_signal = test_thread_emit_signal; } |
