Fix a lots of bugs in the newbinding to pass all the tests.

NOTE: debug info has not been implemented yet.
This commit is contained in:
Siu Kwan Lam 2013-02-13 15:09:26 -06:00
commit a09394cacd
32 changed files with 2419 additions and 546 deletions

View file

@ -1,3 +1,12 @@
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from llvmpy import extra
version = extra.get_llvm_version()
del extra
class Wrapper(object):
def __init__(self, ptr):
assert ptr
@ -9,7 +18,18 @@ class Wrapper(object):
def _extract_ptrs(objs):
return [x._ptr for x in objs]
return [(x._ptr if x is not None else None)
for x in objs]
class LLVMException(Exception):
pass
def test(verbosity=1):
"""test(verbosity=1) -> TextTestResult
Run self-test, and return unittest.runner.TextTestResult object.
"""
from llvm.test_llvmpy import run
return run(verbosity=verbosity)