Skip to content

Commit

Permalink
Support meta char16 and char32
Browse files Browse the repository at this point in the history
Currently done via unsigned integers; might need proper support with Rust's `char`
type in the future.
  • Loading branch information
Bromeon committed Sep 14, 2024
1 parent 6e6889a commit da53d04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions godot-codegen/src/conv/type_conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ fn to_hardcoded_rust_ident(full_ty: &GodotTy) -> Option<&str> {
("int", Some("uint32")) => "u32",
("int", Some("uint16")) => "u16",
("int", Some("uint8")) => "u8",
// TODO handle char types as `char`?
("int", Some("char16")) => "u16",
("int", Some("char32")) => "u32",
("int", Some(meta)) => panic!("unhandled type int with meta {meta:?}"),

// Floats (with single precision builds)
Expand Down

0 comments on commit da53d04

Please sign in to comment.