How in C handle nullable pointer from kotlin nativ...
# kotlin-native
z
How in C handle nullable pointer from kotlin native? I generate sharable library and use in C code. I return from Kotlin String? , in C header I have const char*. And I get an exception when I call method.
o
could you please elaborate what do you do and what expect to get
z
I have a method in Kotlin/Native for example:
Copy code
fun getSubject():String?{}
It can return as
string
as
null
, but I cannot understand how I can handle this in C code. In C code I have:
Copy code
const char* (*getSubject)...
s
Have you tried
getSubject() == NULL
?