~ubuntu-branches/ubuntu/intrepid/libgtkada2/intrepid

« back to all changes in this revision

Viewing changes to contrib/pygtk-2.8.6.diff

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-08-11 09:46:51 UTC
  • mfrom: (6.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080811094651-9mjd6acwa98ffw5c
Tags: 2.12.0-2ubuntu1
Add lpia to supported architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
        * Fixes build with --disable-thread
 
2
        Submitted at: http://bugzilla.gnome.org/show_bug.cgi?id=374603
 
3
 
 
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)
 
7
 static int
 
8
 pyg_gil_state_ensure_py23 (void)
 
9
 {
 
10
+#ifdef DISABLE_THREADING
 
11
+    return 0;
 
12
+#else
 
13
     return PyGILState_Ensure();
 
14
+#endif
 
15
 }
 
16
 
 
17
 static void
 
18
 pyg_gil_state_release_py23 (int flag)
 
19
 {
 
20
+#ifndef DISABLE_THREADING
 
21
     PyGILState_Release(flag);
 
22
+#endif
 
23
 }
 
24
 
 
25
 static PyObject *
 
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
 
29
 
 
30
 #define pyg_threads_enabled (pygobject_api_functions.threads_enabled)
 
31
 
 
32
+#ifdef DISABLE_THREADING
 
33
+#define pyg_gil_state_ensure() 0
 
34
+#define pyg_gil_state_release(state) G_STMT_START {     \
 
35
+    } G_STMT_END
 
36
 
 
37
+#else
 
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);                      \
 
42
     } G_STMT_END
 
43
+#endif
 
44
 
 
45
 #define pyg_begin_allow_threads                         \
 
46
     G_STMT_START {                                      \
 
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_
 
50
 
 
51
 #define pyg_threads_enabled (_PyGObject_API->threads_enabled)
 
52
 
 
53
+#ifdef DISABLE_THREADING
 
54
+#define pyg_gil_state_ensure() 0
 
55
+#define pyg_gil_state_release(state) G_STMT_START {     \
 
56
+    } G_STMT_END
 
57
+
 
58
+#else
 
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);                      \
 
65
     } G_STMT_END
 
66
+#endif
 
67
 
 
68
 #define pyg_begin_allow_threads                 \
 
69
     G_STMT_START {                              \