Browse Source

Re-use IntPtrType in CSharpTypePrinter.cs.

pull/982/head
Joao Matos 8 years ago
parent
commit
06621d43f6
  1. 2
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs

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

@ -583,7 +583,7 @@ namespace CppSharp.Generators.CSharp
if (a.Type.Type == null) if (a.Type.Type == null)
return a.Integral.ToString(CultureInfo.InvariantCulture); return a.Integral.ToString(CultureInfo.InvariantCulture);
var type = a.Type.Type.Desugar(); var type = a.Type.Type.Desugar();
return type.IsPointerToPrimitiveType() ? "global::System.IntPtr" : type.Visit(this); return type.IsPointerToPrimitiveType() ? IntPtrType : type.Visit(this);
} }
public override TypePrinterResult VisitParameterDecl(Parameter parameter) public override TypePrinterResult VisitParameterDecl(Parameter parameter)

Loading…
Cancel
Save