X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Swig.i;h=1a7c393fa91fc7b6c2f2ca4621261ddefb878c87;hp=eadd476e4a00f9e541f0bb1948d7f19e8494512c;hb=9d11375af40826e967ab2c3bcb77d1f9d439c90c;hpb=c63ee099ad2b149bd70136839c973e8910137bc5 diff --git a/src/SMESHGUI/SMESHGUI_Swig.i b/src/SMESHGUI/SMESHGUI_Swig.i index eadd476e4..1a7c393fa 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.i +++ b/src/SMESHGUI/SMESHGUI_Swig.i @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -30,6 +30,23 @@ #include "SMESHGUI_Swig.hxx" %} +/* Exception handler for all functions */ +%exception { + class PyAllowThreadsGuard { + public: + // Py_BEGIN_ALLOW_THREADS + PyAllowThreadsGuard() { _save = PyEval_SaveThread(); } + // Py_END_ALLOW_THREADS + ~PyAllowThreadsGuard() { PyEval_RestoreThread(_save); } + private: + PyThreadState *_save; + }; + + PyAllowThreadsGuard guard; + + $action +} + %include "typemaps.i" class SMESH_Swig @@ -57,4 +74,6 @@ class SMESH_Swig void SetName(const char* Entry, const char* Name); void SetMeshIcon(const char* Mesh_Entry, const bool isComputed); + + void CreateAndDisplayActor( const char* Mesh_Entry ); };