Browse Source

Fixed the type of a function to be its original return type.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/913/head
Dimitar Dobrev 9 years ago
parent
commit
b955068ad1
  1. 4
      src/AST/Function.cs
  2. 2
      src/Generator/Generators/CSharp/CSharpSources.cs

4
src/AST/Function.cs

@ -258,7 +258,7 @@ namespace CppSharp.AST @@ -258,7 +258,7 @@ namespace CppSharp.AST
return visitor.VisitFunctionDecl(this);
}
public Type Type => ReturnType.Type;
public QualifiedType QualifiedType => ReturnType;
public Type Type => OriginalReturnType.Type;
public QualifiedType QualifiedType => OriginalReturnType;
}
}

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

@ -937,7 +937,7 @@ namespace CppSharp.Generators.CSharp @@ -937,7 +937,7 @@ namespace CppSharp.Generators.CSharp
private void GenerateIndexerSetter(Function function)
{
Type type;
function.Type.IsPointerTo(out type);
function.OriginalReturnType.Type.IsPointerTo(out type);
var @internal = TypePrinter.PrintNative(function.Namespace);
var ctx = new CSharpMarshalContext(Context)

Loading…
Cancel
Save