Hi, I have a C API where I am passing `staticCFunc...
# kotlin-native
l
Hi, I have a C API where I am passing
staticCFunction
handler as a reference to my Kotlin function. I can pass a context (a pointer) to the handler. How to pass more structured data, like data class? Primitives are not enough in my case. Can you advice?
I would need something like
cValuesOf
for data class, is there any alternative for this?
s
l
Yes, I did
I know how to pass single pointer to a handler. It works. Question is how to pass pointer to a data class
s
Have you read “Passing user data to callbacks” subsection? Doesn’t it help to achieve exactly this?
l
yes, it works. Thank you!