blob: 0d6f029e4c8b85c1c3877e048e39e2127d01ef4d [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 323ced03a66e6cd963d8277b66cfcc7dce740be7 Mon Sep 17 00:00:00 2001
2From: Lei Maohui <leimaohui@cn.fujitsu.com>
3Date: Fri, 17 Jul 2015 01:33:43 -0700
4Subject: [PATCH] fix Xthe build error when python>3.0
5
6Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
7---
8 src/target_python.c | 7 ++++++-
9 1 file changed, 6 insertions(+), 1 deletion(-)
10
11diff --git a/src/target_python.c b/src/target_python.c
12index 90b43a1..2b76c9e 100644
13--- a/src/target_python.c
14+++ b/src/target_python.c
15@@ -167,7 +167,12 @@ PyGlobalInitialize(const CMPIBroker* broker, CMPIStatus* st)
16
17 Py_SetProgramName("cmpi_swig");
18 Py_Initialize();
19- SWIGEXPORT void SWIG_init(void);
20+#if PY_VERSION_HEX >= 0x03000000
21+SWIGEXPORT PyObject*
22+#else
23+ SWIGEXPORT void
24+#endif
25+ SWIG_init(void);
26 SWIG_init();
27 cmpiMainPyThreadState = PyGILState_GetThisThreadState();
28 PyEval_ReleaseThread(cmpiMainPyThreadState);
29--
302.1.0
31