]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[PY3] Swig additional fixes
authorNicolas Geimer <nicolas.geimer@edf.fr>
Wed, 15 Mar 2017 13:26:12 +0000 (14:26 +0100)
committerNicolas Geimer <nicolas.geimer@edf.fr>
Wed, 15 Mar 2017 14:06:21 +0000 (15:06 +0100)
src/Communication_SWIG/CMakeLists.txt
src/DSC/DSC_Python/CMakeLists.txt
src/LifeCycleCORBA_SWIG/CMakeLists.txt
src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i
src/NOTIFICATION_SWIG/CMakeLists.txt

index 7ee54b5b89c38e663aaccae6e0e8a2eecf1cbff3..9396baf818612f157621430677ed7b427e04729f 100755 (executable)
@@ -20,7 +20,7 @@
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES SWIG_FLAGS "-py3")
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
index 48a6cb428dbe2cdc17ed23bdcdec34d95c093ddd..697747d88f265a09906194b9309d43ecdb3031e6 100755 (executable)
@@ -21,6 +21,7 @@ FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES SWIG_FLAGS "-py3")
 SET(CMAKE_SWIG_FLAGS "-noexcept")
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS})
 
index 6e8dbc3c26f45934b86ae756bd2f13078c0c4bb0..4a8decb55341075c918891ddc0d807d54a9e435b 100755 (executable)
@@ -21,13 +21,13 @@ 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})
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIR}
   ${OMNIORB_INCLUDE_DIR}
+  ${OMNIORBPY_INCLUDE_DIR}
   ${PROJECT_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
index cfebfc51b94ebb883b1b9b97bf481fedc9a31e54..0cce5c6ee21d1974914e3d44173b082badfb5bce 100644 (file)
@@ -45,27 +45,9 @@ typedef int Py_ssize_t;
 #define PY_SSIZE_T_MIN INT_MIN
 #endif
 
-//--- from omniORBpy.h (not present on Debian Sarge packages)
-
-struct omniORBpyAPI {
-
-  PyObject* (*cxxObjRefToPyObjRef)(const CORBA::Object_ptr cxx_obj,
-                                   CORBA::Boolean hold_lock);
-  // Convert a C++ object reference to a Python object reference.
-  // If <hold_lock> is true, caller holds the Python interpreter lock.
-
-  CORBA::Object_ptr (*pyObjRefToCxxObjRef)(PyObject* py_obj,
-                                           CORBA::Boolean hold_lock);
-  // Convert a Python object reference to a C++ object reference.
-  // Raises BAD_PARAM if the Python object is not an object reference.
-  // If <hold_lock> is true, caller holds the Python interpreter lock.
-
-
-  omniORBpyAPI();
-  // Constructor for the singleton. Sets up the function pointers.
-};
-
-omniORBpyAPI* api;
+#include <Python.h>
+#include <omniORBpy.h>
+omniORBpyAPI* api=0;
 
 %}
 
index bdc345db903d61ed7cda0fd6081a76ba1a5962c7..d041a89a6a3e73fd6cb635c61ee1cf6fb7619728 100755 (executable)
@@ -20,7 +20,7 @@
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_FLAGS "-py3")
 SET_SOURCE_FILES_PROPERTIES(NOTIFICATIONPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} -DHAVE_CONFIG_H")
 
 INCLUDE_DIRECTORIES(