Browse Source

Fixed the generation of anonymous types to consider parenting anonymous types.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/339/head
Dimitar Dobrev 11 years ago
parent
commit
3c7c19ffc0
  1. 2
      src/Generator/Passes/CleanInvalidDeclNamesPass.cs
  2. 10
      tests/Basic/Basic.h

2
src/Generator/Passes/CleanInvalidDeclNamesPass.cs

@ -35,7 +35,7 @@ namespace CppSharp.Passes @@ -35,7 +35,7 @@ namespace CppSharp.Passes
// types with empty names are assumed to be private
if (decl is Class && string.IsNullOrWhiteSpace(decl.Name))
{
decl.Name = "_";
decl.Name = decl.Namespace.Name == "_" ? "__" : "_";
decl.ExplicitlyIgnore();
return false;
}

10
tests/Basic/Basic.h

@ -561,3 +561,13 @@ public: @@ -561,3 +561,13 @@ public:
};
DLL_API void va_listFunction(va_list v);
struct DLL_API TestEmptyName
{
struct
{
struct
{
};
};
};

Loading…
Cancel
Save