|
|
|
@ -1397,16 +1397,10 @@ namespace CppSharp.Generators.CSharp |
|
|
|
WriteLine("if (__ManagedVTables == null)"); |
|
|
|
WriteLine("if (__ManagedVTables == null)"); |
|
|
|
WriteStartBraceIndent(); |
|
|
|
WriteStartBraceIndent(); |
|
|
|
|
|
|
|
|
|
|
|
switch (Driver.Options.Abi) |
|
|
|
if (Options.IsMicrosoftAbi) |
|
|
|
{ |
|
|
|
|
|
|
|
case CppAbi.Microsoft: |
|
|
|
|
|
|
|
AllocateNewVTablesMS(@class, entries, wrappedEntries); |
|
|
|
AllocateNewVTablesMS(@class, entries, wrappedEntries); |
|
|
|
break; |
|
|
|
else |
|
|
|
case CppAbi.Itanium: |
|
|
|
|
|
|
|
case CppAbi.ARM: |
|
|
|
|
|
|
|
AllocateNewVTablesItanium(@class, entries, wrappedEntries); |
|
|
|
AllocateNewVTablesItanium(@class, entries, wrappedEntries); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WriteCloseBraceIndent(); |
|
|
|
WriteCloseBraceIndent(); |
|
|
|
NewLine(); |
|
|
|
NewLine(); |
|
|
|
@ -1663,9 +1657,8 @@ namespace CppSharp.Generators.CSharp |
|
|
|
|
|
|
|
|
|
|
|
public void GenerateVTablePointers(Class @class) |
|
|
|
public void GenerateVTablePointers(Class @class) |
|
|
|
{ |
|
|
|
{ |
|
|
|
switch (Driver.Options.Abi) |
|
|
|
if (Options.IsMicrosoftAbi) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case CppAbi.Microsoft: |
|
|
|
|
|
|
|
var index = 0; |
|
|
|
var index = 0; |
|
|
|
foreach (var info in @class.Layout.VFTables) |
|
|
|
foreach (var info in @class.Layout.VFTables) |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -1676,16 +1669,15 @@ namespace CppSharp.Generators.CSharp |
|
|
|
|
|
|
|
|
|
|
|
PopBlock(NewLineKind.BeforeNextBlock); |
|
|
|
PopBlock(NewLineKind.BeforeNextBlock); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
case CppAbi.Itanium: |
|
|
|
else |
|
|
|
case CppAbi.ARM: |
|
|
|
{ |
|
|
|
PushBlock(CSharpBlockKind.InternalsClassField); |
|
|
|
PushBlock(CSharpBlockKind.InternalsClassField); |
|
|
|
|
|
|
|
|
|
|
|
WriteLine("[FieldOffset(0)]"); |
|
|
|
WriteLine("[FieldOffset(0)]"); |
|
|
|
WriteLine("public global::System.IntPtr vfptr0;"); |
|
|
|
WriteLine("public global::System.IntPtr vfptr0;"); |
|
|
|
|
|
|
|
|
|
|
|
PopBlock(NewLineKind.BeforeNextBlock); |
|
|
|
PopBlock(NewLineKind.BeforeNextBlock); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|