https://kotlinlang.org logo
Title
k

kikitux

02/20/2018, 7:44 AM
hello, any rtm pointer to an example where i can pass kotlin type and populate in C and use it back in kotlin ?
o

olonho

02/20/2018, 11:47 AM
Not sure if I understand what are you trying to achieve. In a sense, this code does that: https://github.com/JetBrains/kotlinconf-spinner/blob/master/kotlin-native/samples/fullstack/clients/shared/src/main/kotlin/audio.kt
k

kikitux

02/20/2018, 12:26 PM
i have an char* array in C, say 8 elements, I am just trying to copy them in a for loop, into something. and trying to get the most basic stuff that work
i am trying
char[5][5]
but somehow I can't find the right way to access the 2nd element in Kotlin side
in C
struct Url {
    char  f[40];
    char  u[90];
    char b[5][5];
};
found in kotlin can use
val f = myurl.useContents { f }
        val u = myurl.useContents { u }
so far so good, but for the b i am not sure how to read those in Kotlin
will the example you did share, seems interesting, will see what I can extract
thanks for the link, this one got me started in the right way