summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-22 17:51:10 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-23 14:26:25 -0300
commit4939c254ad0710783bc8cc1ce51a9228990ad5e2 (patch)
tree5f0d8d777762babef4f828b91af62a4e7222c759
parent842677f082fc2f08a36d17541993aa39605f8b8f (diff)
downloadshiboken-4939c254ad0710783bc8cc1ce51a9228990ad5e2.tar.gz
shiboken-4939c254ad0710783bc8cc1ce51a9228990ad5e2.tar.xz
shiboken-4939c254ad0710783bc8cc1ce51a9228990ad5e2.zip
Fix problem when 2 globals functions with the same name were declared in different headers.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Reviewer: Renato Ara├║jo <renato.araujo@openbossa.org>
-rw-r--r--cppgenerator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 3caa6292..50f50e6f 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -2837,16 +2837,16 @@ void CppGenerator::finishGeneration()
foreach (AbstractMetaFunctionList globalOverloads, getFunctionGroups().values()) {
AbstractMetaFunctionList overloads;
foreach (AbstractMetaFunction* func, globalOverloads) {
- if (!func->isModifiedRemoved())
+ if (!func->isModifiedRemoved()) {
overloads.append(func);
+ if (func->typeEntry())
+ includes << func->typeEntry()->include();
+ }
}
if (overloads.isEmpty())
continue;
- if (overloads.first()->typeEntry())
- includes << overloads.first()->typeEntry()->include();
-
writeMethodWrapper(s_globalFunctionImpl, overloads);
writeMethodDefinition(s_globalFunctionDef, overloads);
}