aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-27 17:10:24 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:08:53 -0300
commit1c3869ae5c7fb4c1812200671fedcc41e3c62d5e (patch)
tree05c2af6ee669cf861901c9c5e04b4cb3e3b3caee /generator
parenteb1bab16740473eed6150944e061df96e65321b8 (diff)
Fixed GilState and ThreadSave code generation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index fe9ea5c32..7f708d204 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -532,8 +532,6 @@ 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()) {
snips = func->injectedCodeSnips();
@@ -551,11 +549,8 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
s << defaultReturnExpr;
}
} else {
- if (func->allowThread()) {
- s << INDENT << "Shiboken::ThreadStateSaver " THREAD_STATE_SAVER_VAR ";" << endl;
- s << INDENT << THREAD_STATE_SAVER_VAR ".save();" << endl;
- }
- s << "return this->::" << func->implementingClass()->qualifiedCppName() << "::";
+ s << INDENT << "gil.release();" << endl;
+ s << INDENT << "return this->::" << func->implementingClass()->qualifiedCppName() << "::";
writeFunctionCall(s, func, Generator::VirtualCall);
}
}