summaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.cpp
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-27 17:10:24 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-28 13:47:38 -0300
commit4bc7a3822af0476ffc8a86ffac65775c46d6b4da (patch)
tree5e631f2a9860e5754c803569b3001aa306f44ca4 /generator/cppgenerator.cpp
parentb5cf0972d59ba2bf7df99b73a0b2b0c253aae09f (diff)
downloadshiboken-4bc7a3822af0476ffc8a86ffac65775c46d6b4da.tar.gz
shiboken-4bc7a3822af0476ffc8a86ffac65775c46d6b4da.tar.xz
shiboken-4bc7a3822af0476ffc8a86ffac65775c46d6b4da.zip
Fixed GilState and ThreadSave code generation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r--generator/cppgenerator.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index fe9ea5c3..7f708d20 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);
}
}