python: add __version__

This commit is contained in:
Nguyen Anh Quynh 2016-03-06 21:21:39 +08:00
parent 0950f2e18b
commit eb5a762452
2 changed files with 3 additions and 1 deletions

View file

@ -1,4 +1,4 @@
# Unicorn Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com>
from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const
from .unicorn_const import *
from .unicorn import Uc, uc_version, uc_arch_supported, version_bind, debug, UcError
from .unicorn import Uc, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__

View file

@ -81,6 +81,8 @@ if _found == False:
raise ImportError("ERROR: fail to load the dynamic library.")
__version__ = "%s.%s" %(UC_API_MAJOR, UC_API_MINOR)
# setup all the function prototype
def _setup_prototype(lib, fname, restype, *argtypes):
getattr(lib, fname).restype = restype