summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-12-06 13:52:44 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-12-06 13:52:44 -0300
commitee4f78f615160b65b2d8f3f11a6735fd7da9f0fc (patch)
tree0da44bcd5ce3789b50f0b34afd85b46d2514f744
parent53a4a73c516bbeec546cb20234dad6bd9912fdaa (diff)
downloadshiboken-ee4f78f615160b65b2d8f3f11a6735fd7da9f0fc.tar.gz
shiboken-ee4f78f615160b65b2d8f3f11a6735fd7da9f0fc.tar.xz
shiboken-ee4f78f615160b65b2d8f3f11a6735fd7da9f0fc.zip
Generator now writes the proper variable name on C++ constructor calls.
When a conversion rule is provided for a constructor argument the C++ constructor, for which the conversion rule doesn't apply, is generated with wrong argument names. This commit solves this.
-rw-r--r--generator/shibokengenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp
index b064573d..8be8964e 100644
--- a/generator/shibokengenerator.cpp
+++ b/generator/shibokengenerator.cpp
@@ -1013,7 +1013,8 @@ void ShibokenGenerator::writeArgumentNames(QTextStream &s,
if (((options & Generator::VirtualCall) == 0) &&
(!func->conversionRule(TypeSystem::NativeCode, arguments.at(j)->argumentIndex() + 1).isEmpty() ||
- !func->conversionRule(TypeSystem::TargetLangCode, arguments.at(j)->argumentIndex() + 1).isEmpty())
+ !func->conversionRule(TypeSystem::TargetLangCode, arguments.at(j)->argumentIndex() + 1).isEmpty()) &&
+ !func->isConstructor()
)
s << "_out";