1
* Fixes build with --disable-thread
2
Submitted at: http://bugzilla.gnome.org/show_bug.cgi?id=374603
4
--- gobject/gobjectmodule.c.old 2006-11-12 13:45:27.445909011 +0100
5
+++ gobject/gobjectmodule.c 2006-11-12 13:46:36.515561908 +0100
6
@@ -1942,13 +1942,19 @@ pyg_enable_threads (void)
8
pyg_gil_state_ensure_py23 (void)
10
+#ifdef DISABLE_THREADING
13
return PyGILState_Ensure();
18
pyg_gil_state_release_py23 (int flag)
20
+#ifndef DISABLE_THREADING
21
PyGILState_Release(flag);
26
--- gobject/pygobject-private.h.old 2006-11-12 13:46:59.546112716 +0100
27
+++ gobject/pygobject-private.h 2006-11-12 13:51:23.940955354 +0100
28
@@ -21,12 +21,18 @@ extern struct _PyGObject_Functions pygob
30
#define pyg_threads_enabled (pygobject_api_functions.threads_enabled)
32
+#ifdef DISABLE_THREADING
33
+#define pyg_gil_state_ensure() 0
34
+#define pyg_gil_state_release(state) G_STMT_START { \
38
#define pyg_gil_state_ensure() (pygobject_api_functions.threads_enabled? (PyGILState_Ensure()) : 0)
39
#define pyg_gil_state_release(state) G_STMT_START { \
40
if (pygobject_api_functions.threads_enabled) \
41
PyGILState_Release(state); \
45
#define pyg_begin_allow_threads \
47
--- gobject/pygobject.h.old 2006-11-12 13:47:06.629974549 +0100
48
+++ gobject/pygobject.h 2006-11-12 13:50:38.854834887 +0100
49
@@ -244,6 +244,12 @@ struct _PyGObject_Functions *_PyGObject_
51
#define pyg_threads_enabled (_PyGObject_API->threads_enabled)
53
+#ifdef DISABLE_THREADING
54
+#define pyg_gil_state_ensure() 0
55
+#define pyg_gil_state_release(state) G_STMT_START { \
59
#define pyg_gil_state_ensure() \
60
(_PyGObject_API->threads_enabled ? \
61
(PyGILState_Ensure()) : 0)
62
@@ -251,6 +257,7 @@ struct _PyGObject_Functions *_PyGObject_
63
if (_PyGObject_API->threads_enabled) \
64
PyGILState_Release(state); \
68
#define pyg_begin_allow_threads \