Palash Golecha
06/24/2024, 2:23 PMinterface MyInterface {
fun doSomething()
}
fun useMyInterface(obj: MyInterface) {
obj.doSomething()
}
Right now the generated C header is something like this
typedef struct {
libtest_KNativePtr pinned;
} libtest_kref_io_example_test_MyInterface;
struct {
libtest_KType* (*_type)(void);
void (*doSomething)(libtest_kref_io_example_test_listeners_MyInterface thiz);
} MyInterface;
I can create object of this MyInterface
struct, but useMyInterface
will expect a type of libtest_kref_io_example_test_MyInterface
and to create an object of that pinned would expected to be a pointer to a Kotlin object and not a C pointer to struct of MyInterface