summaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@gmail.com>2011-11-23 15:29:09 -0300
committerPaulo Alcantara <pcacjr@gmail.com>2011-11-23 15:34:28 -0300
commit9f110f83c213867e15b0141a802ebbf74f2ed9f7 (patch)
treee452d1a9c2d20dfbbb2ba10c70479197bd34932e /libshiboken
parent76eeb63edd6c96ac764fc8aca0c43e66ddef3608 (diff)
downloadshiboken-9f110f83c213867e15b0141a802ebbf74f2ed9f7.tar.gz
shiboken-9f110f83c213867e15b0141a802ebbf74f2ed9f7.tar.xz
shiboken-9f110f83c213867e15b0141a802ebbf74f2ed9f7.zip
Fix BUG #10571.0.10
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com> Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'libshiboken')
-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