kevin.cianfarini
12/23/2022, 4:36 AMByteArray
buffer from Kotlin to C so that it can be written to. The underlying lib expects it in the form of an iovec
.
Do I have to use StableRef
to do this? iovec.iov_base
is expecting the buffer in the form of a COpaquePointer
.kevin.cianfarini
12/23/2022, 4:42 AMnatario1
12/23/2022, 10:50 AMByteArray.refTo()
, or pin and then addressOf()
. The first is simpler but it will unpin after the C function returns, which might not be desirable.kevin.cianfarini
12/23/2022, 1:41 PMkevin.cianfarini
12/23/2022, 1:41 PMnatario1
12/23/2022, 1:45 PM