You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
487 B

#!/usr/bin/env python3
# A simple test script to confirm the C FFI for the rust library is working
from cffi import FFI
ffi = FFI()
ffi.set_source("_ffi_test_py"
,"""
#include <stdint.h>
"""
,libraries=["pihash"]
,library_dirs=["."]
)
ffi.cdef("""
void init();
void teardown();
uint64_t ext_get_ahash(const char *);
uint64_t ext_get_dhash(const char *);
uint64_t ext_get_phash(const char *);
""")
if __name__ == "__main__":
ffi.compile()