Browse Source

Walk through typedefs when checking for pointers to primitive types in CLITypePrinter.

pull/1/head
triton 13 years ago
parent
commit
3dd40b1d75
  1. 8
      src/Generator/Generators/CLI/CLIHelpers.cs

8
src/Generator/Generators/CLI/CLIHelpers.cs

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Cxxi.Types;
@ -100,11 +101,16 @@ namespace Cxxi.Generators.CLI @@ -100,11 +101,16 @@ namespace Cxxi.Generators.CLI
return string.Format("{0}^", function.Visit(this, quals));
}
if (pointee.IsPrimitiveType(PrimitiveType.Void))
if (pointee.IsPrimitiveType(PrimitiveType.Void, walkTypedefs: true) ||
pointee.IsPrimitiveType(PrimitiveType.UInt8, walkTypedefs: true))
{
return "System::IntPtr";
}
if (pointee.IsPrimitiveType(PrimitiveType.Char))
{
return "System::String^";
}
return pointee.Visit(this, quals);
}

Loading…
Cancel
Save