Browse Source

Fixed CLI marshaling to take typedefs into account when handling pointer to primitive types.

pull/219/merge
triton 11 years ago
parent
commit
5b15b27312
  1. 6
      src/Generator/Generators/CLI/CLIMarshal.cs

6
src/Generator/Generators/CLI/CLIMarshal.cs

@ -90,7 +90,11 @@ namespace CppSharp.Generators.CLI @@ -90,7 +90,11 @@ namespace CppSharp.Generators.CLI
if (pointee.IsPrimitiveType(out primitive))
{
Context.Return.Write(Context.ReturnVarName);
if (pointer.Pointee is TypedefType)
Context.Return.Write("reinterpret_cast<{0}>({1})", pointer,
Context.ReturnVarName);
else
Context.Return.Write(Context.ReturnVarName);
return true;
}

Loading…
Cancel
Save