Salome HOME
updated copyright message
[modules/gui.git] / src / SUITApp / SUITApp_init_python.cxx
index 0a10ff7c7b0247a7ec94d0b8030090dc225e0bbe..d5fc4d4d538a71bb289adc28375688b35ea040df 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -67,9 +67,11 @@ void SUIT_PYTHON::init_python(int argc, char **argv)
   script += "import sys\n";
   script += "sys.excepthook = _custom_except_hook\n";
   script += "del _custom_except_hook, sys\n";
-  int res = PyRun_SimpleString(qUtf8Printable(script));
+  PyRun_SimpleString(qUtf8Printable(script));
   // VSR (22/09/2016): end of workaround
+#if PY_VERSION_HEX < 0x03070000
   PyEval_InitThreads(); // Create (and acquire) the interpreter lock - can be called many times
+#endif
   // Py_InitThreads acquires the GIL
   PyThreadState *pts = PyGILState_GetThisThreadState(); 
   PyEval_ReleaseThread(pts);