Could you advice how to iterate over array of `con...
# kotlin-native
l
Could you advice how to iterate over array of
const passing_t**
in C and converted to Kotlin native as
passing: CPointer<CPointerVar<passing_t>>?
? I don't know how to get sizeOf the array to itterate
d
You're passing an array to C or you're getting an array from C?
You can't iterate over pointer without knowing the size.
l
I am getting this from C code in a handler. I have the number of elements but I need to convert this to an Array to be able to iterate over
I need to convert it to
Array<passing_t>
somehow
well, it seems I can get elements by
passing!!.get(0)!!.pointed
and loop like this (and of course handing nulls properly)
👍🏼 2