summaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.cpp
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-26 15:38:21 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-26 16:32:07 -0300
commit65e55dba0ff70976e67d8c46699a6ca629ef4bf0 (patch)
treebfbbb176dcd5ea5372de665afd11be067a86643c /generator/cppgenerator.cpp
parenta91a1dad8abaeb71783b9ba26c8d2fb6d2a22eef (diff)
downloadshiboken-65e55dba0ff70976e67d8c46699a6ca629ef4bf0.tar.gz
shiboken-65e55dba0ff70976e67d8c46699a6ca629ef4bf0.tar.xz
shiboken-65e55dba0ff70976e67d8c46699a6ca629ef4bf0.zip
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/cppgenerator.cpp')
-rw-r--r--generator/cppgenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 051af21c..fe9ea5c3 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);
}
}