Browse Source

Merge pull request #420 from txdv/fixes

A few minor fixes.
pull/428/head
João Matos 11 years ago
parent
commit
096a74c418
  1. 2
      src/Core/Parser/ASTConverter.cs
  2. 3
      src/Generator.Tests/AST/TestAST.cs
  3. 6
      src/Generator/AST/VTables.cs

2
src/Core/Parser/ASTConverter.cs

@ -619,7 +619,7 @@ namespace CppSharp @@ -619,7 +619,7 @@ namespace CppSharp
if (decl == null)
return null;
if (decl.OriginalPtr == null)
if (decl.OriginalPtr == IntPtr.Zero)
throw new NotSupportedException("Original pointer must not be null");
var originalPtr = decl.OriginalPtr;

3
src/Generator.Tests/AST/TestAST.cs

@ -9,8 +9,6 @@ namespace CppSharp.Generator.Tests.AST @@ -9,8 +9,6 @@ namespace CppSharp.Generator.Tests.AST
[TestFixture]
public class TestAST : ASTTestFixture
{
private PassBuilder<TranslationUnitPass> passBuilder;
[TestFixtureSetUp]
public void Init()
{
@ -20,7 +18,6 @@ namespace CppSharp.Generator.Tests.AST @@ -20,7 +18,6 @@ namespace CppSharp.Generator.Tests.AST
public void Setup()
{
ParseLibrary("AST.h", "ASTExtensions.h");
passBuilder = new PassBuilder<TranslationUnitPass>(Driver);
}
[Test]

6
src/Generator/AST/VTables.cs

@ -12,11 +12,13 @@ namespace CppSharp.AST @@ -12,11 +12,13 @@ namespace CppSharp.AST
{
case CppAbi.Microsoft:
return GatherVTableMethodsMS(@class);
default:
case CppAbi.Itanium:
return GatherVTableMethodsItanium(@class);
}
throw new NotSupportedException();
throw new NotSupportedException(
string.Format("VTable format for {0} is not supported", @class.Layout.ABI.ToString().Split('.').Last())
);
}
private static List<VTableComponent> GatherVTableMethodEntries(VTableLayout layout)

Loading…
Cancel
Save