diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-06-26 10:41:35 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-06-26 10:41:35 +0200 |
commit | 2a4cb58fc9e680bb2bf3fe268ca96147cbe903ef (patch) | |
tree | a55cb61beb8285de5e38429eb416d6a6c608d067 /ffi-macros/src/rust2c.rs | |
parent | 16553c8bd46f16811691bb0f657e0ee6593697ef (diff) |
openpgp-ffi, ffi, ffi-macros: Avoid deprecated integer types.
Diffstat (limited to 'ffi-macros/src/rust2c.rs')
-rw-r--r-- | ffi-macros/src/rust2c.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ffi-macros/src/rust2c.rs b/ffi-macros/src/rust2c.rs index 84117ce5..56ef9761 100644 --- a/ffi-macros/src/rust2c.rs +++ b/ffi-macros/src/rust2c.rs @@ -29,6 +29,16 @@ fn ident2c(ident: &syn::Ident) -> (String, bool) { "int8_t" | "int16_t" | "int32_t" | "int64_t" | "uint8_t" | "uint16_t" | "uint32_t" | "uint64_t" => return (ident_string.clone(), false), + + // Primitive types. + "u8" => return ("uint8_t".into(), false), + "u16" => return ("uint16_t".into(), false), + "u32" => return ("uint32_t".into(), false), + "u64" => return ("uint64_t".into(), false), + "i8" => return ("int8_t".into(), false), + "i16" => return ("int16_t".into(), false), + "i32" => return ("int32_t".into(), false), + "i64" => return ("int64_t".into(), false), _ => (), } |