Support 32-bit Linux

This commit is contained in:
Andika Wasisto 2020-08-18 19:29:29 +07:00
parent e7269e5348
commit 0936dc353e
3 changed files with 2 additions and 1 deletions

BIN
libqwqng-wrapper-x86-64.so Normal file

Binary file not shown.

Binary file not shown.

View file

@ -18,13 +18,14 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import platform
from ctypes import cdll, c_void_p, c_int, c_double, POINTER, c_char
class QngWrapperLinux:
def __init__(self):
self.libqwqng_wrapper = cdll.LoadLibrary('./libqwqng-wrapper.so')
self.libqwqng_wrapper = cdll.LoadLibrary('./libqwqng-wrapper-x86-64.so' if platform.machine().endswith('64') else './libqwqng-wrapper.so')
self.libqwqng_wrapper.GetQwqngInstance.restype = c_void_p
self.libqwqng_wrapper.RandInt32.argtypes = [c_void_p]
self.libqwqng_wrapper.RandInt32.restype = c_int