https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
i

Iaroslav Postovalov

03/01/2021, 6:18 PM
Hi! Any example of receiving a function pointer with Kotlin method?
cc @aleksey.tomin
a

aleksey.tomin

03/02/2021, 5:54 AM
I don’t need this. I always send kotlin lambda and wrap it into method
You can create something like (it’s from libmicrohttpd):
Copy code
val dh = staticCFunction<COpaquePointer?, CPointer<MHD_Connection>?, CPointer<ByteVar>?, CPointer<ByteVar>?, CPointer<ByteVar>?, CPointer<ByteVar>?, CPointer<size_tVar>?, CPointer<COpaquePointerVar>?, MHD_Result>
3 Views