aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-26 15:38:21 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:08:53 -0300
commitce8f43df969038f5e24c7923abeac2c9fa6461e0 (patch)
treed116562943ec0d5a4c69856aac7eb19ed15e61ec /generator
parent467240696e7ed0ca03cdecffa2b63112ab9507d8 (diff)
Release gil before call C++ function on virtual method.
Fixes bug #423. Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 051af21c7..fe9ea5c32 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -532,6 +532,7 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
s << INDENT << "if (py_override.isNull()) {" << endl;
{
Indentation indentation(INDENT);
+ s << INDENT << "gil.release();" << endl;
CodeSnipList snips;
if (func->hasInjectedCode()) {
@@ -554,8 +555,7 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
s << INDENT << "Shiboken::ThreadStateSaver " THREAD_STATE_SAVER_VAR ";" << endl;
s << INDENT << THREAD_STATE_SAVER_VAR ".save();" << endl;
}
-
- s << INDENT << "return this->::" << func->implementingClass()->qualifiedCppName() << "::";
+ s << "return this->::" << func->implementingClass()->qualifiedCppName() << "::";
writeFunctionCall(s, func, Generator::VirtualCall);
}
}