import { CFunction, FFIType } from 'arkffi';
// C: void sort(int* arr, int (*cmp)(int, int));
const cmp = CFunction({ args: [FFIType.int32, FFIType.int32], returns: FFIType.int32, ptr: cmpPtr });
ffi.callMixed(handle, 'sort', 'ip', 'v', [arrPtr, cmp.ptr], []);