diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-12-17 11:05:53 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:49 -0300 |
commit | 94270ee0e58336535378eef7fbb889c127f25c6b (patch) | |
tree | 7b7a609135fb9e56e5c96c8e67f0d8750684a54b | |
parent | 62d4437e2d0df7a0706b564519e8fb26303f1e9a (diff) |
-rw-r--r-- | generator/cppgenerator.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index f1e900f36..ea304b937 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -810,20 +810,8 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu writeCodeSnips(s, snips, CodeSnip::End, TypeSystem::NativeCode, func, lastArg); } - if (type) { - if (!invalidateReturn && (func->type()->isObject() || func->type()->isValuePointer()) ) { - s << INDENT << "if (" << PYTHON_RETURN_VAR << "->ob_refcnt < 2) {" << endl; - { - Indentation indent(INDENT); - s << INDENT << "PyErr_SetString(PyExc_ReferenceError, \"Returning last python reference on virtual function: " - << func->ownerClass()->name() << "." << func->name() << "\");" << endl; - s << INDENT << "PyErr_Print();" << endl; - s << INDENT << "assert(false);" << endl; - } - s << INDENT << "}" << endl; - } + if (type) s << INDENT << "return " CPP_RETURN_VAR ";" << endl; - } s << '}' << endl << endl; } |