Browse Source

Fixed vtable generation for the Itanium case.

pull/227/merge
João Matos 11 years ago committed by triton
parent
commit
ab5e7a3a8b
  1. 4
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

@ -1434,7 +1434,7 @@ namespace CppSharp.Generators.CSharp @@ -1434,7 +1434,7 @@ namespace CppSharp.Generators.CSharp
var vfptr = @class.Layout.VFTables[tableIndex];
var size = vfptr.Layout.Components.Count;
WriteLine("var vfptr{0} = Marshal.AllocHGlobal({1} * {2});",
tableIndex, size, Driver.Options.Is32Bit ? 4 : 8);
tableIndex, size, Driver.Options.Is32Bit ? 4 : 8);
WriteLine("_NewVTables[{0}] = vfptr{0}.ToPointer();", tableIndex);
for (int entryIndex = 0; entryIndex < vfptr.Layout.Components.Count; entryIndex++)
@ -1465,7 +1465,7 @@ namespace CppSharp.Generators.CSharp @@ -1465,7 +1465,7 @@ namespace CppSharp.Generators.CSharp
// reserve space for the offset-to-top and RTTI pointers as well
var size = entries.Count;
WriteLine("var vfptr{0} = Marshal.AllocHGlobal({1} * {2});", 0, size, Driver.Options.Is32Bit ? 4 : 8);
WriteLine("_NewVTables[{0}] = vfptr0.ToPointer();");
WriteLine("_NewVTables[0] = vfptr0.ToPointer();");
for (int i = 0; i < entries.Count; i++)
{

Loading…
Cancel
Save