Merge pull request #51 from xanathar/pr/repr-c-enums

Added compatibility with repr(C) enum types, defaulting to uint type
This commit is contained in:
Yoshifumi Kawai 2023-09-20 18:50:24 +09:00 committed by GitHub
commit 6c04d9d2f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,6 +376,7 @@ namespace {namespace}
fn convert_token_enum_repr(repr: &str) -> &str { fn convert_token_enum_repr(repr: &str) -> &str {
match repr { match repr {
"(C)" => "uint",
"(u8)" => "byte", "(u8)" => "byte",
"(u16)" => "ushort", "(u16)" => "ushort",
"(u32)" => "uint", "(u32)" => "uint",