From: Nicolas Geimer Date: Tue, 14 Mar 2017 14:25:21 +0000 (+0100) Subject: [PY3] Swig Python3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d2777a097f41f3b0e4125f4a7e287f56955c34db;p=modules%2Fyacs.git [PY3] Swig Python3 --- diff --git a/src/LifeCycleCORBA_SWIG/CMakeLists.txt b/src/LifeCycleCORBA_SWIG/CMakeLists.txt index 38e526dfa..6e8dbc3c2 100755 --- a/src/LifeCycleCORBA_SWIG/CMakeLists.txt +++ b/src/LifeCycleCORBA_SWIG/CMakeLists.txt @@ -20,6 +20,7 @@ INCLUDE(${SWIG_USE_FILE}) SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_FLAGS "-py3") SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_DEFINITIONS "-shadow") ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) diff --git a/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i b/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i index ecfef6ab9..cfebfc51b 100644 --- a/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i +++ b/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i @@ -84,7 +84,7 @@ omniORBpyAPI* api; return NULL; } PyObject* pyapi = PyObject_GetAttrString(omnipy, (char*)"API"); - api = (omniORBpyAPI*)PyCapsule_New(pyapi,NULL,NULL); + api = (omniORBpyAPI*)PyCapsule_GetPointer(pyapi,"_omnipy.API"); Py_DECREF(pyapi); %}