From 21efb8fc8397cd48caa6573545fb6adacad8c23e Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 8 Apr 2014 16:57:28 +0100 Subject: [PATCH] Fixed a bug by removing this weird looking code from the C# marshaller. The test suite still passes too. --- src/Generator/Generators/CSharp/CSharpMarshal.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpMarshal.cs b/src/Generator/Generators/CSharp/CSharpMarshal.cs index 7bae725b..f7b37e3d 100644 --- a/src/Generator/Generators/CSharp/CSharpMarshal.cs +++ b/src/Generator/Generators/CSharp/CSharpMarshal.cs @@ -236,15 +236,6 @@ namespace CppSharp.Generators.CSharp var ctx = Context as CSharpMarshalContext; string instance = Context.ReturnVarName; - if (ctx.Kind == CSharpMarshalKind.NativeField) - { - string copy = Generator.GeneratedIdentifier("copy"); - if (VarSuffix > 0) - copy += VarSuffix; - Context.SupportBefore.WriteLine( - "var {0} = new global::System.IntPtr(&{1});", copy, instance); - instance = copy; - } if (@class.IsRefType && (Context.ReturnType.Qualifiers.IsConst || !Context.ReturnType.Type.IsAddress()) &&