diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-11-18 09:20:36 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-11-18 09:20:36 -0300 |
commit | 75988e117f22d6bd228dc3fa54887bfcf3773b00 (patch) | |
tree | 23c6237bd1d75d25b731eebdbbc16259af583bb3 | |
parent | bcc342a9ae9bf5126a28fe462f98c4f7e51a5d1f (diff) |
Fixed ownership modification writer: the argument index for the self
object is -1 not 0.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
-rw-r--r-- | cppgenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index 1e566eb03..8c3e30fda 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -1056,7 +1056,7 @@ void CppGenerator::writeMethodCall(QTextStream& s, const AbstractMetaFunction* f s << INDENT << "// Ownership transferences." << endl; foreach (ArgumentModification arg_mod, ownership_mods) { s << INDENT << "PyBaseWrapper_setOwnership("; - if (arg_mod.index == 0) { + if (arg_mod.index == -1) { s << "self"; } else if (arg_mod.index == 0) { s << retvalVariableName(); |