From 98858a73ee20784e64e570cea20d30a3a4720b82 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Fri, 3 Mar 2017 16:35:20 +0000 Subject: [PATCH] Implement GetPrimitiveTypeWidth for signed/unsigned chars. --- src/Generator/Generators/CSharp/CSharpTypePrinter.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 0d473a24..084ac3c4 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -459,6 +459,14 @@ namespace CppSharp.Generators.CSharp { switch (primitive) { + case PrimitiveType.Char: + width = targetInfo?.CharWidth ?? 8; + signed = true; + break; + case PrimitiveType.UChar: + width = targetInfo?.CharWidth ?? 8; + signed = false; + break; case PrimitiveType.Short: width = targetInfo?.ShortWidth ?? 16; signed = true;