Browse Source
buffer clearing for the c code. Changes to the python code. Working on getting a reasonable python FFI example in place.
develop
buffer clearing for the c code. Changes to the python code. Working on getting a reasonable python FFI example in place.
develop
3 changed files with 13 additions and 33 deletions
@ -1,25 +0,0 @@ |
|||
#!/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() |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue