# Pastebin ROWJAcgX GilState::GilState() { if (Py_IsInitialized()) { m_gstate = PyGILState_Ensure(); m_locked = true; } }