summaryrefslogtreecommitdiffstats
path: root/libshiboken/gilstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libshiboken/gilstate.cpp')
-rw-r--r--libshiboken/gilstate.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libshiboken/gilstate.cpp b/libshiboken/gilstate.cpp
index cc8963ff..cb682fa7 100644
--- a/libshiboken/gilstate.cpp
+++ b/libshiboken/gilstate.cpp
@@ -26,8 +26,9 @@ namespace Shiboken
{
GilState::GilState()
+ : m_locked(false)
{
- if(Py_IsInitialized()) {
+ if (Py_IsInitialized()) {
m_gstate = PyGILState_Ensure();
m_locked = true;
}
@@ -40,11 +41,11 @@ GilState::~GilState()
void GilState::release()
{
- if(m_locked && Py_IsInitialized()) {
+ if (m_locked && Py_IsInitialized()) {
PyGILState_Release(m_gstate);
m_locked = false;
}
}
-} // namespace Shiboken
+} // namespace Shiboken