blob: 21f55c0e6f8eeba72a2e11f1ff1dafc18201b5ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
Taken from: https://git.xfce.org/bindings/thunarx-python/commit/?id=3037ebe25d5c6ed58699e56b61f657cea3e5a5a6
Author: Mukundan Ragavan <nonamedotc@gmail.com>
--- a/src/thunarx-python-object.c
+++ b/src/thunarx-python-object.c
@@ -24,6 +24,7 @@
#include <thunarx/thunarx.h>
+#define NO_IMPORT_PYGOBJECT
#include <pygobject.h>
#include <string.h>
--- a/src/thunarx-python.c
+++ b/src/thunarx-python.c
@@ -30,6 +30,18 @@
#include "thunarx-python.h"
#include "thunarx-python-object.h"
+PyTypeObject *_PyGtkWidget_Type;
+PyTypeObject *_PyThunarxFileInfo_Type;
+PyTypeObject *_PyThunarxMenuItem_Type;
+PyTypeObject *_PyThunarxMenu_Type;
+PyTypeObject *_PyThunarxMenuProvider_Type;
+PyTypeObject *_PyThunarxPreferencesProvider_Type;
+PyTypeObject *_PyThunarxPropertyPage_Type;
+PyTypeObject *_PyThunarxPropertyPageProvider_Type;
+PyTypeObject *_PyThunarxProviderPlugin_Type;
+PyTypeObject *_PyThunarxRenamer_Type;
+PyTypeObject *_PyThunarxRenamerProvider_Type;
+
static const GDebugKey thunarx_python_debug_keys[] = {
{"all", THUNARX_PYTHON_DEBUG_ALL},
};
--- a/src/thunarx-python.h
+++ b/src/thunarx-python.h
@@ -43,37 +43,37 @@ extern ThunarxPythonDebug thunarx_python_debug;
#define debug_enter_args(x, y) { if (thunarx_python_debug & THUNARX_PYTHON_DEBUG_ALL) \
g_printf("%s: entered " x "\n", __FUNCTION__, y); }
-PyTypeObject *_PyGtkWidget_Type;
+extern PyTypeObject *_PyGtkWidget_Type;
#define PyGtkWidget_Type (*_PyGtkWidget_Type)
-PyTypeObject *_PyThunarxFileInfo_Type;
+extern PyTypeObject *_PyThunarxFileInfo_Type;
#define PyThunarxFileInfo_Type (*_PyThunarxFileInfo_Type)
-PyTypeObject *_PyThunarxMenuItem_Type;
+extern PyTypeObject *_PyThunarxMenuItem_Type;
#define PyThunarxMenuItem_Type (*_PyThunarxMenuItem_Type)
-PyTypeObject *_PyThunarxMenu_Type;
+extern PyTypeObject *_PyThunarxMenu_Type;
#define PyThunarxMenu_Type (*_PyThunarxMenu_Type)
-PyTypeObject *_PyThunarxMenuProvider_Type;
+extern PyTypeObject *_PyThunarxMenuProvider_Type;
#define PyThunarxMenuProvider_Type (*_PyThunarxMenuProvider_Type)
-PyTypeObject *_PyThunarxPreferencesProvider_Type;
+extern PyTypeObject *_PyThunarxPreferencesProvider_Type;
#define PyThunarxPreferencesProvider_Type (*_PyThunarxPreferencesProvider_Type)
-PyTypeObject *_PyThunarxPropertyPage_Type;
+extern PyTypeObject *_PyThunarxPropertyPage_Type;
#define PyThunarxPropertyPage_Type (*_PyThunarxPropertyPage_Type)
-PyTypeObject *_PyThunarxPropertyPageProvider_Type;
+extern PyTypeObject *_PyThunarxPropertyPageProvider_Type;
#define PyThunarxPropertyPageProvider_Type (*_PyThunarxPropertyPageProvider_Type)
-PyTypeObject *_PyThunarxProviderPlugin_Type;
+extern PyTypeObject *_PyThunarxProviderPlugin_Type;
#define PyThunarxProviderPlugin_Type (*_PyThunarxProviderPlugin_Type)
-PyTypeObject *_PyThunarxRenamer_Type;
+extern PyTypeObject *_PyThunarxRenamer_Type;
#define PyThunarxRenamer_Type (*_PyThunarxRenamer_Type)
-PyTypeObject *_PyThunarxRenamerProvider_Type;
+extern PyTypeObject *_PyThunarxRenamerProvider_Type;
#define PyThunarxRenamerProvider_Type (*_PyThunarxRenamerProvider_Type)
#endif /* THUNARX_PYTHON_H */
|