From 3dd40b1d75ffab6eee665d8d4838077f81e8b744 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 22 Jan 2013 18:36:39 +0000 Subject: [PATCH] Walk through typedefs when checking for pointers to primitive types in CLITypePrinter. --- src/Generator/Generators/CLI/CLIHelpers.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Generator/Generators/CLI/CLIHelpers.cs b/src/Generator/Generators/CLI/CLIHelpers.cs index afa29cad..a3e64517 100644 --- a/src/Generator/Generators/CLI/CLIHelpers.cs +++ b/src/Generator/Generators/CLI/CLIHelpers.cs @@ -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 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); }