From 58b2529df381f4dbff1d83c4558d17c9e85753f0 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sun, 11 Aug 2013 15:30:01 +0300 Subject: [PATCH] A simple prototype for supporting unions. Signed-off-by: Dimitar Dobrev --- src/AST/Class.cs | 2 +- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/AST/Class.cs b/src/AST/Class.cs index 90fd1d50..479cac4b 100644 --- a/src/AST/Class.cs +++ b/src/AST/Class.cs @@ -138,7 +138,7 @@ namespace CppSharp.AST public bool IsValueType { - get { return Type == ClassType.ValueType; } + get { return Type == ClassType.ValueType || IsUnion; } } public bool IsRefType diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 4e0b88ad..fe08c1fe 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -310,12 +310,6 @@ namespace CppSharp.Generators.CSharp PushBlock(CSharpBlockKind.Class); GenerateDeclarationCommon(@class); - if (@class.IsUnion) - { - // TODO: How to do wrapping of unions? - throw new NotImplementedException(); - } - GenerateClassProlog(@class); NewLine();