I have a param of C function with reference to ref...
# kotlin-native
g
I have a param of C function with reference to reference
**variable
(this type generated by interop:
CValuesRef<COpaquePointerVar>
). So in C you pass reference to this reference (like
&variable
). How can I do this in K/N?
s
Something like
Copy code
memScoped {
    val variableVar = alloc<COpaquePointerVar>()
    nativeFun(variableVar.ptr)
    variableVar.value // equivalent to `variable` in C
}
should work.
g
Oh, thanks so much!