From: stv Date: Thu, 21 Jun 2007 07:15:37 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: For_HDF~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1d966b8bea572df550d00b2c75db186c41700d48;p=modules%2Fgui.git *** empty log message *** --- diff --git a/src/PyConsole/PyConsole_Interp.cxx b/src/PyConsole/PyConsole_Interp.cxx index a2c0d47a9..b71c02178 100644 --- a/src/PyConsole/PyConsole_Interp.cxx +++ b/src/PyConsole/PyConsole_Interp.cxx @@ -79,9 +79,27 @@ bool PyConsole_Interp::initState() { // The GIL is acquired and will be held on initState output // It is the caller responsability to release the lock if needed + +/* LLS PyEval_AcquireLock(); _tstate = Py_NewInterpreter(); // create an interpreter and save current state PySys_SetArgv(PyInterp_base::_argc,PyInterp_base::_argv); // initialize sys.argv +*/ + + PyEval_AcquireLock(); +#ifdef WIN32 + _tstate = PyGILState_GetThisThreadState(); + // if no thread state defined + if ( _tstate ) + PyThreadState_Swap(_tstate); + else +#endif + { + _tstate = Py_NewInterpreter(); // create an interpreter and save current state + PySys_SetArgv(PyInterp_base::_argc,PyInterp_base::_argv); // initialize sys.argv + //if(MYDEBUG) MESSAGE("PythonConsole_PyInterp::initState - this = "<