Browse Source

Fixed the wrapping of function pointers in C#.

pull/1/head
triton 12 years ago
parent
commit
703190fe70
  1. 6
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

6
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -515,8 +515,12 @@ namespace CppSharp.Generators.CSharp @@ -515,8 +515,12 @@ namespace CppSharp.Generators.CSharp
if (CSharpTypePrinter.IsConstCharString(field.QualifiedType))
isRefClass = true;
FunctionType functionType;
if (fieldType.IsPointerTo(out functionType))
isRefClass = true;
if (isRefClass)
type = "void**";
type = "void*";
var location = string.Format("({0} + {1})", instance,
field.OffsetInBytes);

Loading…
Cancel
Save