diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2019-03-20 18:51:57 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2019-03-21 21:31:25 +0800 |
commit | ba980c7cedc9a886d394b81215c279f2b17e475c (patch) | |
tree | 892745b8854a873db09ac004ee2d8dd1f395cfc0 /ffi/python/she.py | |
parent | 9dc5b41fbcb4d155659f6937a62e814bba4220b0 (diff) | |
download | tangerine-mcl-ba980c7cedc9a886d394b81215c279f2b17e475c.tar.gz tangerine-mcl-ba980c7cedc9a886d394b81215c279f2b17e475c.tar.zst tangerine-mcl-ba980c7cedc9a886d394b81215c279f2b17e475c.zip |
binding of she supports windows
Diffstat (limited to 'ffi/python/she.py')
-rw-r--r-- | ffi/python/she.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ffi/python/she.py b/ffi/python/she.py index e509f65..ab89752 100644 --- a/ffi/python/she.py +++ b/ffi/python/she.py @@ -26,13 +26,14 @@ def init(curveType=MCL_BN254): global lib name = platform.system() if name == 'Linux': - suf = 'so' + libName = 'libmclshe256.so' elif name == 'Darwin': - suf = 'dylib' + libName = 'libmclshe256.dylib' + elif name == 'Windows': + libName = 'mclshe256.dll' else: raise RuntimeError("not support yet", name) - libname = "libmclshe256." + suf - lib = cdll.LoadLibrary(libname) + lib = cdll.LoadLibrary(libName) ret = lib.sheInit(MCL_BN254, MCLBN_COMPILED_TIME_VAR) if ret != 0: raise RuntimeError("sheInit", ret) |