Commit 7bfe4b21 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests: Make ffi_callback.py be able to run on uclibc and macosx.

Similar to ffi_float.py.
parent 58056b0f
......@@ -5,7 +5,18 @@ except ImportError:
print("SKIP")
sys.exit()
libc = ffi.open("libc.so.6")
def ffi_open(names):
err = None
for n in names:
try:
mod = ffi.open(n)
return mod
except OSError as e:
err = e
raise err
libc = ffi_open(('libc.so', 'libc.so.0', 'libc.so.6', 'libc.dylib'))
qsort = libc.func("v", "qsort", "piip")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment