hfhbd
02/26/2022, 3:41 PMstaticCFunction
?
expected type: kotlinx.cinterop.CPointer<kotlinx.cinterop.CFunction<(...) -> kotlin.Unit>>
I want to use it with this code:
fun caller() {
var counter = 0
val s: () -> Unit = {
counter++
}
consumer(staticCFunction(s)) // does not work, because I use the local variable `counter`
}
fun consumer(callback: kotlinx.cinterop.CPointer<kotlinx.cinterop.CFunction<(...) -> kotlin.Unit>>) { ... }