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
return visitor.VisitFunctionDecl(this); return visitor.VisitFunctionDecl(this);
} }
public Type Type => ReturnType.Type; public Type Type => OriginalReturnType.Type;
public QualifiedType QualifiedType => ReturnType; public QualifiedType QualifiedType => OriginalReturnType;
} }
} }

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

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

Loading…
Cancel
Save