diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/doxygen.cpp | 3 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 6388ce3..957c3ae 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1389,7 +1389,8 @@ static void processTagLessClasses(ClassDef *rootCd, if (type.find(icd->name())!=-1) // matching tag less struct/union { QCString name = md->name(); - if (md->isAnonymous()) name = "__unnamed__"; + /* DGA fix #7556 ANSI-C anonymous (unnamed) struct/unions have duplicated names (__unnamed__) */ + if (md->isAnonymous()) name = "__unnamed__" + name.right(name.length()-1); /* DGA: ensure unique name */ if (!prefix.isEmpty()) name.prepend(prefix+"."); //printf(" found %s for class %s\n",name.data(),cd->name().data()); ClassDef *ncd = createTagLessInstance(rootCd,icd,name); diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 4ecee5e..7da71ce 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -1573,6 +1573,7 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini // (templateArguments(), definitionTemplateParameterLists()) QCString memType; + QCString name; bool isFunc=FALSE; switch (md->memberType()) { @@ -1594,9 +1595,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()); |