15 lines
228 B
C++
15 lines
228 B
C++
|
|
#include <GILLock.h>
|
|
|
|
|
|
//Use this class in a c++ funktion that called into python : c++ => python
|
|
|
|
PyLockGIL::PyLockGIL()
|
|
: m_gstate(PyGILState_Ensure()) {
|
|
|
|
}
|
|
|
|
PyLockGIL::~PyLockGIL() {
|
|
PyGILState_Release(m_gstate);
|
|
}
|