-// 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
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);