makeNativeValueArguments function

Pointer<NativeValue> makeNativeValueArguments(
  1. BindingObject ownerBindingObject,
  2. List args
)

Implementation

Pointer<NativeValue> makeNativeValueArguments(BindingObject ownerBindingObject, List<dynamic> args) {
  Pointer<NativeValue> buffer = malloc.allocate(sizeOf<NativeValue>() * args.length);

  for(int i = 0; i < args.length; i ++) {
    toNativeValue(buffer.elementAt(i), args[i], ownerBindingObject);
  }

  return buffer.cast<NativeValue>();
}