Skip to content

Handle function pointer types in constant array struct naming#4

Open
deathbeam wants to merge 1 commit into
BeanCheeseBurrito:mainfrom
deathbeam:fix-binding-generator
Open

Handle function pointer types in constant array struct naming#4
deathbeam wants to merge 1 commit into
BeanCheeseBurrito:mainfrom
deathbeam:fix-binding-generator

Conversation

@deathbeam
Copy link
Copy Markdown

Use GetTypeIdentifier instead of GetTypeName for the array size suffix
to ensure the generated struct name is always a valid C# identifier.
This prevents invalid identifiers when the element type is a function
pointer or other non-identifier-compatible type.

Also derive the struct name from GetTypeName(type) directly rather than
constructing it manually, which correctly handles complex types.

Signed-off-by: Tomas Slusny slusnucky@gmail.com

Use GetTypeIdentifier instead of GetTypeName for the array size suffix
to ensure the generated struct name is always a valid C# identifier.
This prevents invalid identifiers when the element type is a function
pointer or other non-identifier-compatible type.

Also derive the struct name from GetTypeName(type) directly rather than
constructing it manually, which correctly handles complex types.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant