29 #ifndef _CONTAINER_INIT_PYTHON_HXX_
30 #define _CONTAINER_INIT_PYTHON_HXX_
32 #include "SALOME_Container.hxx"
33 #include <SALOMEconfig.h>
55 #define Py_ACQUIRE_NEW_THREAD \
56 PyEval_AcquireLock(); \
57 PyThreadState *myTstate = PyThreadState_New(KERNEL_PYTHON::_interp); \
58 PyThreadState_Swap(myTstate);
60 #define Py_RELEASE_NEW_THREAD \
61 PyEval_ReleaseThread(myTstate); \
62 PyThreadState_Delete(myTstate);
67 static PyThreadState *get_gtstate() {
return KERNEL_PYTHON::_gtstate; }
68 static PyObject *getsalome_shared_modules_module() {
return KERNEL_PYTHON::salome_shared_modules_module; }
69 static PyInterpreterState *get_interp() {
return KERNEL_PYTHON::_interp; }
71 static PyThreadState *_gtstate;
72 static PyObject *salome_shared_modules_module;
73 static PyInterpreterState *_interp;
75 static void init_python(
int argc,
char **argv);
Definition: Container_init_python.hxx:64