From 267c2ac7c3a38567ca5fc85644ff89fdde4f97b2 Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 4 Apr 2013 15:55:11 +0100 Subject: [PATCH] Added support for marshaling of wide char in addition to regular chars. --- src/Generator/Generators/CLI/CLIMarshal.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index 119a2003..429a3522 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -6,7 +6,6 @@ namespace Cxxi.Generators.CLI { public class CLIMarshalNativeToManagedPrinter : MarshalPrinter { - public CLIMarshalNativeToManagedPrinter(MarshalContext marshalContext) : base(marshalContext) { @@ -340,7 +339,8 @@ namespace Cxxi.Generators.CLI return true; } - if (pointee.IsPrimitiveType(PrimitiveType.Char)) + if (pointee.IsPrimitiveType(PrimitiveType.Char) || + pointee.IsPrimitiveType(PrimitiveType.WideChar)) { Context.SupportBefore.WriteLine( "auto _{0} = clix::marshalString({1});",