summaryrefslogtreecommitdiffstats
path: root/src/perlmodgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/perlmodgen.cpp')
-rw-r--r--src/perlmodgen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index a6e9f22..eceff59 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -1569,6 +1569,7 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
// (templateArguments(), definitionTemplateParameterLists())
QCString memType;
+ QCString name;
bool isFunc=FALSE;
switch (md->memberType())
{
@@ -1590,9 +1591,13 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
case MemberType_Dictionary: memType="dictionary"; break;
}
+ /* DGA fix #7556 ANSI-C anonymous (unnamed) struct/unions have duplicated names (__unnamed__) */
+ name = md->name();
+ if (md->isAnonymous()) name = "__unnamed__" + name.right(name.length() - 1); /* DGA: ensure unique name */
+
m_output.openHash()
.addFieldQuotedString("kind", memType)
- .addFieldQuotedString("name", md->name())
+ .addFieldQuotedString("name", name)
.addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuotedString("protection", getProtectionName(md->protection()))
.addFieldBoolean("static", md->isStatic());