aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-09-02 17:07:07 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-09-02 17:35:08 -0300
commit515f5edc0f3f3d8ecbd9b583b55f294d607abdf9 (patch)
treec0cf19fbfda913be16f6a639cecd138339730641
parent7d38f877d69fe44dbe7c36fb15cd477acccb4500 (diff)
Make the ownership transfer to CPP in native virtual functions.
Fixes bug #304. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
-rw-r--r--cppgenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 734f649dd..e4af52067 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -659,7 +659,8 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
if (arg_mod.resetAfterUse) {
s << INDENT << "BindingManager::instance().invalidateWrapper(PyTuple_GET_ITEM(pyargs, ";
s << (arg_mod.index - 1) << "));" << endl;
- } else if ((arg_mod.index == 0) && (arg_mod.ownerships[TypeSystem::TargetLangCode] == TypeSystem::TargetLangOwnership)) {
+ } else if ((arg_mod.index == 0) && (arg_mod.ownerships[TypeSystem::TargetLangCode] == TypeSystem::CppOwnership)) {
+ s << INDENT << "BindingManager::instance().invalidateWrapper(" << PYTHON_RETURN_VAR ".object());" << endl;
transferReturnToCpp = true;
}
}