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
if (decl == null) if (decl == null)
return null; return null;
if (decl.OriginalPtr == null) if (decl.OriginalPtr == IntPtr.Zero)
throw new NotSupportedException("Original pointer must not be null"); throw new NotSupportedException("Original pointer must not be null");
var originalPtr = decl.OriginalPtr; var originalPtr = decl.OriginalPtr;

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

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

6
src/Generator/AST/VTables.cs

@ -12,11 +12,13 @@ namespace CppSharp.AST
{ {
case CppAbi.Microsoft: case CppAbi.Microsoft:
return GatherVTableMethodsMS(@class); return GatherVTableMethodsMS(@class);
default: case CppAbi.Itanium:
return GatherVTableMethodsItanium(@class); 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) private static List<VTableComponent> GatherVTableMethodEntries(VTableLayout layout)

Loading…
Cancel
Save