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
|
--- wxpython.cpp 2009/09/04 00:36:39 1.70
+++ wxpython.cpp 2009/10/04 23:03:13 1.71
@@ -106,7 +106,11 @@
{
// startup/shutdown
void(*G_Py_Initialize)(void) = NULL;
+#ifdef __LP64__
+ PyObject*(*G_Py_InitModule4_64)(char*, struct PyMethodDef*, char*, PyObject*, int) = NULL;
+#else
PyObject*(*G_Py_InitModule4)(char*, struct PyMethodDef*, char*, PyObject*, int) = NULL;
+#endif
void(*G_Py_Finalize)(void) = NULL;
// errors
@@ -145,7 +149,11 @@
// redefine the Py* functions to their equivalent G_* wrappers
#define Py_Initialize G_Py_Initialize
-#define Py_InitModule4 G_Py_InitModule4
+#ifdef __LP64__
+ #define Py_InitModule4_64 G_Py_InitModule4_64
+#else
+ #define Py_InitModule4 G_Py_InitModule4
+#endif
#define Py_Finalize G_Py_Finalize
#define PyErr_Occurred G_PyErr_Occurred
#define PyErr_SetString G_PyErr_SetString
@@ -185,7 +193,11 @@
} pythonFuncs[] =
{
PYTHON_FUNC(Py_Initialize)
+#ifdef __LP64__
+ PYTHON_FUNC(Py_InitModule4_64)
+#else
PYTHON_FUNC(Py_InitModule4)
+#endif
PYTHON_FUNC(Py_Finalize)
PYTHON_FUNC(PyErr_Occurred)
PYTHON_FUNC(PyErr_SetString)
|