Browse Source

Replaced an expression with a variable so that the & operator works.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/46/head
Dimitar Dobrev 12 years ago
parent
commit
f163ceac63
  1. 4
      src/Generator/Generators/CSharp/CSharpMarshal.cs

4
src/Generator/Generators/CSharp/CSharpMarshal.cs

@ -206,7 +206,9 @@ namespace CppSharp.Generators.CSharp @@ -206,7 +206,9 @@ namespace CppSharp.Generators.CSharp
string instance = Context.ReturnVarName;
if (ctx.Kind == CSharpMarshalKind.NativeField)
{
instance = string.Format("new global::System.IntPtr(&{0})", instance);
Context.SupportBefore.WriteLine(
"var __copy = new global::System.IntPtr(&{0});", instance);
instance = "__copy";
}
if (@class.IsRefType)

Loading…
Cancel
Save