intListToUint64Array function

Pointer<Uint64> intListToUint64Array(
  1. List<int> list
)

Convert Dart int list to C uint64 array.

Implementation

Pointer<Uint64> intListToUint64Array(List<int> list) {
  final length = list.length;
  final pointer = calloc<Uint64>(length + 1); // +1 if null-terminated.
  for (int index = 0; index < length; index++) {
    pointer[index] = list[index];
  }
  return pointer;
}