Browse Source

Desugar the pointee type when checking for primitive types in the marshaler.

pull/1/head
triton 13 years ago
parent
commit
d27ec5aa1c
  1. 3
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs

3
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -173,7 +173,7 @@ namespace CppSharp.Generators.CSharp
return isManagedContext ? "string" : "System.IntPtr"; return isManagedContext ? "string" : "System.IntPtr";
PrimitiveType primitive; PrimitiveType primitive;
if (pointee.IsPrimitiveType(out primitive)) if (pointee.Desugar().IsPrimitiveType(out primitive))
return "System.IntPtr"; return "System.IntPtr";
Class @class; Class @class;
@ -242,6 +242,7 @@ namespace CppSharp.Generators.CSharp
typeMap.Declaration = decl; typeMap.Declaration = decl;
typeMap.Type = template; typeMap.Type = template;
Context.Type = template; Context.Type = template;
Context.CSharpKind = ContextKind;
return new CSharpTypePrinterResult() return new CSharpTypePrinterResult()
{ {
Type = GetCSharpSignature(typeMap), Type = GetCSharpSignature(typeMap),

Loading…
Cancel
Save