Browse Source

Merge pull request #357 from ddobrev/master

Fixed incompilable code generated by the C++/CLI back-end when wrapping certain unions
pull/358/head
João Matos 11 years ago
parent
commit
8120b4ac74
  1. 3
      src/Generator/Generators/CLI/CLISourcesTemplate.cs
  2. 12
      tests/Basic/Basic.h

3
src/Generator/Generators/CLI/CLISourcesTemplate.cs

@ -662,7 +662,8 @@ namespace CppSharp.Generators.CLI @@ -662,7 +662,8 @@ namespace CppSharp.Generators.CLI
{
ArgName = property.Name,
ReturnVarName = nativeField,
ReturnType = property.QualifiedType
ReturnType = property.QualifiedType,
Declaration = property.Field
};
var marshal = new CLIMarshalNativeToManagedPrinter(ctx);

12
tests/Basic/Basic.h

@ -602,14 +602,24 @@ public: @@ -602,14 +602,24 @@ public:
DLL_API void va_listFunction(va_list v);
struct DLL_API TestEmptyName
struct DLL_API TestNestedTypes
{
public:
struct
{
struct
{
};
};
union as_types
{
int as_int;
struct uchars
{
unsigned char blue, green, red, alpha;
} as_uchar;
};
};
class DLL_API HasStdString

Loading…
Cancel
Save