summaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 026e9475..2a0891d9 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -2978,6 +2978,12 @@ impl TryToRustTy for Type {
IntKind::ULong => Ok(raw_type(ctx, "c_ulong")),
IntKind::LongLong => Ok(raw_type(ctx, "c_longlong")),
IntKind::ULongLong => Ok(raw_type(ctx, "c_ulonglong")),
+ IntKind::WChar { size } => {
+ let ty = Layout::known_type_for_size(size)
+ .expect("Non-representable wchar_t?");
+ let ident = ctx.rust_ident_raw(ty);
+ Ok(quote! { #ident })
+ },
IntKind::I8 => Ok(quote! { i8 }),
IntKind::U8 => Ok(quote! { u8 }),