I've been attempting to convert a list into a va-l...
# kotlin-native
c
I've been attempting to convert a list into a va-list. But I have been having issues with which 'va_list' the code is pointing to
Copy code
e: /mnt/bulk/SourceCode/git/kotlinx-gtk/nativex/src/nativeMain/kotlin/nativex/glib/Variant.kt: (53, 4): Type mismatch: inferred type is va_list /* = CPointer<platform.posix.__va_list_tag> */ but va_list? /* = CPointer<platform.builtin.__va_list_tag>? */ was expected
Is the error I get, but
platform.builtin
has no members I can see
m
Unfortunately, I don't know exactly how to check that it works as it should, nevertheless, after changing the compiler to version '1.5.0-RC' it looks like it is at least possible to compile it.
Copy code
fun get(format: String, vararg args: String) {
    val varargs: platform.posix.va_list = 
        args.toList().toNullTermCStringArray().reinterpret()

    g_variant_get_va(
        variantPointer,
        format,
        null,
        varargs
    )
}