From d27ec5aa1cf3c57f2c1a59fcab10bd2845d27d79 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 26 May 2013 18:31:40 +0100 Subject: [PATCH] Desugar the pointee type when checking for primitive types in the marshaler. --- src/Generator/Generators/CSharp/CSharpTypePrinter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 56ef1463..e9289ba1 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -173,7 +173,7 @@ namespace CppSharp.Generators.CSharp return isManagedContext ? "string" : "System.IntPtr"; PrimitiveType primitive; - if (pointee.IsPrimitiveType(out primitive)) + if (pointee.Desugar().IsPrimitiveType(out primitive)) return "System.IntPtr"; Class @class; @@ -242,6 +242,7 @@ namespace CppSharp.Generators.CSharp typeMap.Declaration = decl; typeMap.Type = template; Context.Type = template; + Context.CSharpKind = ContextKind; return new CSharpTypePrinterResult() { Type = GetCSharpSignature(typeMap),