i have a c function that accepts something like `s...
# kotlin-native
w
i have a c function that accepts something like
some_struct_t**
and the function populates the array at the given pointer. i’ve seen docs on how to create an array and get a pointer to it in K/N but since i don’t know the size of it ahead of time i’m not sure how to create it. in c i would just pass a pointer to such an empty array but i’m not sure what the kotlin equivalent is
l
Create an arena and use arena.alloc<CPointerVar<some_struct>>(). This will give you a double pointer to some_struct.
w
thank you 🙂