forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
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
From 323ced03a66e6cd963d8277b66cfcc7dce740be7 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Fri, 17 Jul 2015 01:33:43 -0700
Subject: [PATCH] fix Xthe build error when python>3.0
 
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
 src/target_python.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
 
diff --git a/src/target_python.c b/src/target_python.c
index 90b43a1..2b76c9e 100644
--- a/src/target_python.c
+++ b/src/target_python.c
@@ -167,7 +167,12 @@ PyGlobalInitialize(const CMPIBroker* broker, CMPIStatus* st)
   
   Py_SetProgramName("cmpi_swig");
   Py_Initialize();
-  SWIGEXPORT void SWIG_init(void);
+#if PY_VERSION_HEX >= 0x03000000
+SWIGEXPORT PyObject*
+#else
+  SWIGEXPORT void 
+#endif
+  SWIG_init(void);
   SWIG_init();
   cmpiMainPyThreadState = PyGILState_GetThisThreadState();
   PyEval_ReleaseThread(cmpiMainPyThreadState); 
-- 
2.1.0