Skip to content

Commit

Permalink
Merge pull request #275 from tannergooding/v13.0.0
Browse files Browse the repository at this point in the history
Ensure anonymous unions stay "anonymous" and not "unnamed"
  • Loading branch information
tannergooding authored Oct 10, 2021
2 parents 38747b8 + 28ef800 commit 1c1b145
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,11 @@ private string GetTypeName(Cursor cursor, Cursor context, Type rootType, Type ty
name = name.Replace("unnamed struct at", "anonymous struct at");
}

if (name.Contains("unnamed union at"))
{
name = name.Replace("unnamed union at", "anonymous union at");
}

nativeTypeName = name;

if (type is ArrayType arrayType)
Expand Down

0 comments on commit 1c1b145

Please sign in to comment.