Browse Source

Added support for marshaling of wide char in addition to regular chars.

pull/1/head
triton 12 years ago
parent
commit
267c2ac7c3
  1. 4
      src/Generator/Generators/CLI/CLIMarshal.cs

4
src/Generator/Generators/CLI/CLIMarshal.cs

@ -6,7 +6,6 @@ namespace Cxxi.Generators.CLI @@ -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 @@ -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<clix::E_UTF8>({1});",

Loading…
Cancel
Save