From bc14348d5fe9f96e30cc3355d8666e9123886a70 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Tue, 20 Aug 2013 23:57:55 +0300 Subject: [PATCH] Generated compilable wrappers for functions taking char*. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CSharp/CSharpMarshal.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpMarshal.cs b/src/Generator/Generators/CSharp/CSharpMarshal.cs index b228c0d5..3fce5e19 100644 --- a/src/Generator/Generators/CSharp/CSharpMarshal.cs +++ b/src/Generator/Generators/CSharp/CSharpMarshal.cs @@ -344,9 +344,9 @@ namespace CppSharp.Generators.CSharp var pointee = pointer.Pointee; Type type = pointee.Desugar(); - if ((type.IsPrimitiveType(PrimitiveType.Char) || - type.IsPrimitiveType(PrimitiveType.WideChar)) && - pointer.QualifiedPointee.Qualifiers.IsConst) + if ((type.IsPrimitiveType(PrimitiveType.Char) || + type.IsPrimitiveType(PrimitiveType.WideChar)) && + pointer.QualifiedPointee.Qualifiers.IsConst) { Context.Return.Write("Marshal.StringToHGlobalAnsi({0})", Helpers.SafeIdentifier(Context.Parameter.Name));