Browse Source

Set an index when marshalling the value in setters of properties.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1033/head
Dimitar Dobrev 8 years ago
parent
commit
a96b2e2877
  1. 5
      src/Generator/Generators/CSharp/CSharpSources.cs

5
src/Generator/Generators/CSharp/CSharpSources.cs

@ -979,6 +979,8 @@ namespace CppSharp.Generators.CSharp @@ -979,6 +979,8 @@ namespace CppSharp.Generators.CSharp
Name = "value",
QualifiedType = new QualifiedType(type)
},
ParameterIndex = function.Parameters.Count(
p => p.Kind != ParameterKind.IndirectReturnType),
ReturnType = new QualifiedType(type)
};
var marshal = new CSharpMarshalManagedToNativePrinter(ctx);
@ -2952,8 +2954,7 @@ namespace CppSharp.Generators.CSharp @@ -2952,8 +2954,7 @@ namespace CppSharp.Generators.CSharp
if (param.Kind == ParameterKind.IndirectReturnType)
continue;
marshals.Add(GenerateFunctionParamMarshal(param, paramIndex, function));
paramIndex++;
marshals.Add(GenerateFunctionParamMarshal(param, paramIndex++, function));
}
return marshals;

Loading…
Cancel
Save