Browse Source

Corrected the generation of the native constructor when in a structure.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/46/head
Dimitar Dobrev 12 years ago
parent
commit
01d3779e2b
  1. 3
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

@ -1362,7 +1362,8 @@ namespace CppSharp.Generators.CSharp @@ -1362,7 +1362,8 @@ namespace CppSharp.Generators.CSharp
PopBlock(NewLineKind.BeforeNextBlock);
PushBlock(CSharpBlockKind.Method);
WriteLine("internal {0}(global::System.IntPtr native)", SafeIdentifier(@class.Name));
WriteLine("internal {0}(global::System.IntPtr native){1}", SafeIdentifier(@class.Name),
@class.IsValueType ? " : this()" : string.Empty);
var hasBaseClass = @class.HasBaseClass && @class.BaseClass.IsRefType;
if (hasBaseClass)

Loading…
Cancel
Save