Skip to content

Commit 1c1b145

Browse files
Merge pull request #275 from tannergooding/v13.0.0
Ensure anonymous unions stay "anonymous" and not "unnamed"
2 parents 38747b8 + 28ef800 commit 1c1b145

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,11 @@ private string GetTypeName(Cursor cursor, Cursor context, Type rootType, Type ty
15291529
name = name.Replace("unnamed struct at", "anonymous struct at");
15301530
}
15311531

1532+
if (name.Contains("unnamed union at"))
1533+
{
1534+
name = name.Replace("unnamed union at", "anonymous union at");
1535+
}
1536+
15321537
nativeTypeName = name;
15331538

15341539
if (type is ArrayType arrayType)

0 commit comments

Comments
 (0)