diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index f2546c3a..415016c9 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -353,12 +353,18 @@ namespace Cxxi.Generators.CLI } FunctionType func; - if (typedef.Declaration.Type.IsPointerTo(out func)) + if (decl.Type.IsPointerTo(out func)) { VisitDelegateType(func, typedef.Declaration.OriginalName); return true; } + PrimitiveType primitive; + if (decl.Type.IsPrimitiveType(out primitive, walkTypedefs: true)) + { + Return += string.Format("({0})", typedef.Declaration.Name); + } + return decl.Type.Visit(this); }